Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-03 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bastien writes: > Hi, > > stardiviner writes: > >> Here is my patch, I try to annotate on my patch code to express my >> words: > > Thanks - I see what is hardcoded and why. > > Since the whole idea is to use something else than url-copy-file for

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-03 Thread Bastien
Hi, stardiviner writes: > Here is my patch, I try to annotate on my patch code to express my > words: Thanks - I see what is hardcoded and why. Since the whole idea is to use something else than url-copy-file for downloading URLs I would rather add an option to allow using a custom function.

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-02 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bastien writes: > Hi Stardiviner, > > stardiviner writes: > >> I think maybe Org maintainer can improve the org-attach code to suitable to >> add >> custom function. > > Sorry, I don't understand. > > Can you to use M-x customize-option RET org

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-02 Thread Bastien
Hi Stardiviner, stardiviner writes: > I think maybe Org maintainer can improve the org-attach code to suitable to > add > custom function. Sorry, I don't understand. Can you to use M-x customize-option RET org-attach-commands RET then add a custom command pointing to the command you have wri

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-02 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Bastien writes: > Hi, > > stardiviner writes: > >> I added monolith link to defcustom option docstring now. Update >> patch again. > > thanks for working on this, sorry for coming late to the party. > > The initial need was to be able to download

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-06-02 Thread Bastien
Hi, stardiviner writes: > I added monolith link to defcustom option docstring now. Update > patch again. thanks for working on this, sorry for coming late to the party. The initial need was to be able to download big web documents asynchronously* but the conversation drifted and the patch now

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-29 Thread Ihor Radchenko
> AFAICT, org-board uses the following options, which limit the archiving > to a single page and all its resources: > > wget -e robots=off --page-requisites --adjust-extension --convert-links [...] This is certainly better. I believe that wget would be a better default (with right flags). It is mu

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-29 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew Lundin writes: > Ihor Radchenko writes: > >>> As I said, PATCH welcome, I admired many times I don't have ability to >>> build a >>> complex archive functionality on url.el or wget or curl. >> >> I have found the following solution [1] u

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-29 Thread Matthew Lundin
Ihor Radchenko writes: >> As I said, PATCH welcome, I admired many times I don't have ability to build >> a >> complex archive functionality on url.el or wget or curl. > > I have found the following solution [1] using wget: > > wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL > I don

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ihor Radchenko writes: >> As I said, PATCH welcome, I admired many times I don't have ability to build >> a >> complex archive functionality on url.el or wget or curl. > > I have found the following solution [1] using wget: > > wget --mirror -p -

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
I added monolith link to defcustom option docstring now. Update patch again. From 6c667461b45e93059c6f801e485f7da4bfc3606c Mon Sep 17 00:00:00 2001 From: stardiviner Date: Fri, 29 May 2020 09:46:15 +0800 Subject: [PATCH] * org-attach.el: add a new command to archive web page * lisp/org-at

[PATCH updated] Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
I adopted some part of my patch, and make function name and docstring more clear after this mail thread long discussion. From 7e682ccd8d0d2a567de1bbbc0c8e02ee59e156bb Mon Sep 17 00:00:00 2001 From: stardiviner Date: Fri, 29 May 2020 09:46:15 +0800 Subject: [PATCH] * org-attach.el: add a ne

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Ihor Radchenko
> As I said, PATCH welcome, I admired many times I don't have ability to build a > complex archive functionality on url.el or wget or curl. I have found the following solution [1] using wget: wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL This will not bundle the page into a single

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew Lundin writes: > Ihor Radchenko writes: > >> My view on this is bare-bones download, in a spirit of org-attach >> itself. There is already 'url method in org-attach-attach, but it is >> hard-coded to url-retrieve-synchronously. It would b

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Thanks, Ihor, your explanation is helpful a lot!!! Ihor Radchenko writes: >> My uneasiness has more to do with the specificity of the dependence on >> monolith and the way that is hard-coded into the patch. When it comes to >> patches, I think pr

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew Lundin writes: > Ihor Radchenko writes: > >> It does not mean that attaching URL directly is not worth including >> into org. This sounds pretty common use case, especially considering >> the number of packages providing similar feature.

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Samuel Wales
i keep wondering if this is similar to the idea of making all external links cached. or specified ones. using a specified cache dir. for example, you could have various external links in your html-exportable document, and run a command to cache them all.

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Matthew Lundin
Ihor Radchenko writes: > My view on this is bare-bones download, in a spirit of org-attach > itself. There is already 'url method in org-attach-attach, but it is > hard-coded to url-retrieve-synchronously. It would be handy if user > could configure alternative retrievers (like monolith, wget, cu

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Ihor Radchenko
> I don't know how to implement similar functionality like monolith with > url-retrieve-synchronously + save-buffer. PATCH welcome. Sorry, I missed that the default 'url attach method exists already. > Of course curl and wget is alternative options, just still same problem. Don't > know how to do

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Ihor Radchenko
> My uneasiness has more to do with the specificity of the dependence on > monolith and the way that is hard-coded into the patch. When it comes to > patches, I think priority should go to those that are configurable, > accessible, and useful for everyone as opposed to those that have > hard-coded

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Matthew Lundin
Ihor Radchenko writes: > It does not mean that attaching URL directly is not worth including > into org. This sounds pretty common use case, especially considering > the number of packages providing similar feature. You mentioned > org-board, but there is also org-download and org-web-tools. My

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ihor Radchenko writes: >> If have better solution, I totally agree with that. > > In the current state, your patch will be pretty much useless for users > without technical background. > > url-retrieve-synchronously + save-buffer should be a bette

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-28 Thread Ihor Radchenko
> If have better solution, I totally agree with that. In the current state, your patch will be pretty much useless for users without technical background. url-retrieve-synchronously + save-buffer should be a better default. It will be available for all users. Ideally, there should be several cus

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew Lundin writes: > stardiviner writes: > >> I attached the patch. >> >> I think this feature will be helpful for use who archive web page data >> usually >> like me. To be more portable, I also added an defcustom option for other >> extern

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Ihor Radchenko writes: >> This looks helpful, but I think this should be an add-on rather than >> integrated into the org-attach. I'm glad to learn about monolith, but >> far fewer users are likely to have it installed than have wget or curl >> in

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Matthew Lundin writes: > stardiviner writes: > >> I attached the patch. >> >> I think this feature will be helpful for use who archive web page data >> usually >> like me. To be more portable, I also added an defcustom option for other >> extern

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread Ihor Radchenko
> This looks helpful, but I think this should be an add-on rather than > integrated into the org-attach. I'm glad to learn about monolith, but > far fewer users are likely to have it installed than have wget or curl > installed. You might also want to check out org-board, which has similar > functi

Re: [Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread Matthew Lundin
stardiviner writes: > I attached the patch. > > I think this feature will be helpful for use who archive web page data usually > like me. To be more portable, I also added an defcustom option for other > external command. And use an if condition to detect whether external command > available, els

[Feature] add a new org-attach dispatcher command to offline save web page

2020-05-27 Thread stardiviner
I attached the patch. I think this feature will be helpful for use who archive web page data usually like me. To be more portable, I also added an defcustom option for other external command. And use an if condition to detect whether external command available, else warning user. -- [ stardivin