Hi Max,

Max Nikulin <maniku...@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