emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] New remote resource download policy


From: Timothy
Subject: Re: [PATCH] New remote resource download policy
Date: Wed, 29 Jun 2022 23:27:59 +0800
User-agent: mu4e 1.6.11; emacs 28.0.92

Hi Max,

Max Nikulin <manikulin@gmail.com> 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 general form isn’t exposed by Emacs, 
>> a
>> little bit of proliferation seems like the best option to me.
>
> From my point of view the result is rather close (prompt should be adjusted):
>
> (let ((uri “<https://orgmode.org>”))
>   (org-mks
>    nil
>    (format “An org-mode document would like to download %s, which is not
>   considered safe.
>
> Do you want to download this?”
>          (propertize uri ’face ’(:inherit org-link :weight normal)))
>    nil ; prompt
>    `((,(propertize “!” ’face ’success)
>       “download this resource, and permanantly mark it as safe.”)
>      (,(propertize “y” ’face ’warning)
>       “to download this resource, just this once.”)
>      (,(propertize “n” ’face ’error)
>       “skip this resource.”))))

I just tried this snippet and it looked quite different to me, that said I have
tweaked `org-mks' a bit in my config… (I initially found org-capture quite
ugly).

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'.

All the best,
Timothy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]