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: Sun, 27 Oct 2024 15:06:36 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

[ஞாயிறு அக்டோபர் 27, 2024] Eli Zaretskii wrote:

>> From: Ihor Radchenko <yantar92@posteo.net>
>> Cc: visuweshm@gmail.com, pinmacs@cas.cat, rpluim@gmail.com, 
>> emacs-devel@gnu.org
>> Date: Sun, 27 Oct 2024 08:17:22 +0000
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> 1. clipboard contains 2 MIME types: image/png, image/bmp
>> 2. clipboard contains 1 MIME type: image/png
>> 3. clipboard contains 1 MIME type: image/bmp
>> 
>> We want to handle all three scenarios in the following way:
>> 1. Select image/png (prefer it over image/bmp)
>> 2. Select image/png
>> 3. Select image/bmp (there is no image/png that we would prefer otherwise)
>> 
>> In all three cases, we do not want to prompt user about mimetype choice.
>> 
>> How can we do it using the existing Elisp API?
>
> Examine the available TARGETS, then bind
> yank-media--registered-handlers to the appropriate value when invoking
> yank-media.

Would that not defeat the point of yank-media, which is to present a
simple, common interface to the clipboard data to major-mode authors?
This approach also means that we would end up with org-yank-media,
html-yank-media, etc. which does not sound better.



reply via email to

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