emacs-devel
[Top][All Lists]
Advanced

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

Re: yank-media: allow users to limit image types that can be inserted


From: Visuwesh
Subject: Re: yank-media: allow users to limit image types that can be inserted
Date: Tue, 24 Sep 2024 18:12:03 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

[செவ்வாய் செப்டம்பர் 24, 2024] Eli Zaretskii wrote:

>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: rpluim@gmail.com,  pinmacs@cas.cat,  emacs-devel@gnu.org
>> Date: Tue, 24 Sep 2024 10:30:49 +0530
>> 
>> [திங்கள் செப்டம்பர் 23, 2024] Eli Zaretskii wrote:
>> 
>> >> AFAIR the yank-media code, there's no way for the handlers to reject a
>> >> specific format.  yank-media, the command, asks the user the type she
>> >> wants, _then_ calls the handler specific to that type.  The handler
>> >> cannot influence anything during this interaction.
>> >
>> > This is true, but I don't see how it is relevant to what I suggested.
>> 
>> I was replying to this part:
>> 
>>     The issue at hand here, AFAIU, is not the UI, but how Lisp programs
>>     (and Org in particular) can control this.
>> 
>> My point was that there is little control over this UI from the handlers
>> type since the handler cannot filter the types available.
>
> OK, but then my point was that a Lisp program _can_ control this by
> customizing the list of handlers.  

Perhaps, we view the user option in different lights.  I see the user
option as a knob to narrow down the available types to a few (or one)
types that the user personally wants.

> It could even replace all the handlers with its own single handler,
> which could then call the other handlers according to some logic, thus
> working around the fact that there's no mechanism currently for a
> handler to refuse to handle the type for which it is registered.

If you meant to say use ".*" as TYPES in yank-media-handler that
wouldn't work because the user is asked before yank-media, the command,
calls the handler with the mimetype and the clipboard data.
If you meant something else, then sorry I do not understand what you
wrote.  But your point has gotten across to me, I think.



reply via email to

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