Re: [PATCH] New remote resource download policy

2022-07-16 Thread Timothy
Hi Max, I’ve just made a few more tweaks, tested it, and pushed this as 0583a0c. We may want to tweak this further before the next Org release, but I think this is a good enough starting point. > An idea: a menu entry that displays location in the org file that caused the > prompt. However it may

Re: [PATCH] New remote resource download policy

2022-06-30 Thread Max Nikulin
On 29/06/2022 22:27, Timothy wrote: Max Nikulin writes: I also really don’t like how `org-mks' so forcefully grabs all keyboard input. I can see it being nice to jump back to the buffer and see where the resource is being used, which isn’t really possible using `org-mks'. An idea: a menu entry

Re: [PATCH] New remote resource download policy

2022-06-29 Thread Timothy
Hi Max, Max Nikulin writes: >>> I see your intention to add something fancy to the dialog. May `org-mks’ be >>> reused instead to avoid proliferation variants of rather similar UI code? >> Well, the thing here is that I’m explicitly trying to mimic the >> file-local-variable dialog, and since a

Re: [PATCH] New remote resource download policy

2022-06-25 Thread Max Nikulin
On 22/06/2022 17:01, Timothy wrote: — a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -525,7 +525,11 @@ (defun org-attach-attach (file &optional visit-dir method) [snip] +(if (or (not noninteractive) (org–should-fetch-remote-resource-p file)) I am confused by (not noninteractive). Do

Re: [PATCH] New remote resource download policy

2022-06-22 Thread Max Nikulin
On 22/06/2022 17:01, Timothy wrote: +(defun org–confirm-resource-safe (uri) + “Ask the user if URI should be considered safe, returning non-nil if so.” +(unless noninteractive + (let ((buf (get-buffer-create “*Org Remote Resource*”))) I see your intention to add something fancy to t

Re: [PATCH] New remote resource download policy

2022-06-22 Thread Timothy
Hi Max, >> — a/lisp/org-attach.el >> +++ b/lisp/org-attach.el >> @@ -525,7 +525,11 @@ (defun org-attach-attach (file &optional visit-dir >> method) >> [snip] >> +(if (or (not noninteractive) (org–should-fetch-remote-resource-p >> file)) > > I am confused by (not noninteractive). Does it

Re: [PATCH] New remote resource download policy

2022-06-22 Thread Timothy
Hi Robert, > Timothy> +(defcustom org-download-remote-resources ’prompt > > ’prompted when downloading unsafe resources’ > > maybe? > > Does this need a ’prompt-always option? I guess thatʼs what you get > with the default value of `org-safe-remote-resources’, but maybe it > makes sense to be

Re: [PATCH] New remote resource download policy

2022-06-15 Thread Max Nikulin
On 12/06/2022 21:43, Timothy wrote: As was raised in the #+include: URL thread (https://list.orgmode.org/877d5sd7yu@gmail.com), currently Org will automatically download files without confirmation in various circumstances. This patch introduces two variables to control Org’s attitude tow

Re: [PATCH] New remote resource download policy

2022-06-14 Thread Robert Pluim
> On Sun, 12 Jun 2022 22:43:07 +0800, Timothy said: Timothy> Hi All, Timothy> As was raised in the `#+include: URL' thread Timothy> (), currently Org will Timothy> automatically download files without confirmation in various

Re: [PATCH] New remote resource download policy

2022-06-12 Thread Daniel Fleischer
Timothy [2022-06-12 Sun 22:43] wrote: > As was raised in the #+include: URL thread > (https://list.orgmode.org/877d5sd7yu@gmail.com), currently Org will > automatically download files without confirmation in various circumstances. > > This patch introduces two variables to control Org’s atti

[PATCH] New remote resource download policy

2022-06-12 Thread Timothy
Hi All, As was raised in the `#+include: URL' thread (), currently Org will automatically download files without confirmation in various circumstances. This patch introduces two variables to control Org’s attitude towards downloading files, and h