emacs-devel
[Top][All Lists]
Advanced

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

Re: `M-x yank-media'


From: Lars Ingebrigtsen
Subject: Re: `M-x yank-media'
Date: Sun, 07 Nov 2021 14:48:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> But those are just the types.  How do we fetch the stuff afterwards?

With

(gui-get-selection 'CLIPBOARD 'image/png)

and then some slight massaging; see yank-media--get-selection.

>> I haven't looked at Windows, but I'm guessing it has to grow a similar
>> set of capabilities.
>
> The TARGETS thingy is already supported, has been for a long time:
>
>   (gui-get-selection 'CLIPBOARD 'TARGETS)
>    =>
>    [DataObject text/html HTML\ Format text/_moz_htmlinfo 
> text/_moz_htmlcontext application/x-moz-file-promise-url 
> application/x-moz-file-promise-dest-filename FILE_NAMES Preferred\ DropEffect 
> application/x-moz-nativeimage DIB Ole\ Private\ Data BITMAP nil]
>
> (This is after "Copy Image" in Firefox.)  But I suspect that's not all
> of the story.

So that's why `yank-media' saying it can't find any matches, because
it's looking for "image/.*" (in Message buffers).

It sounds like application/x-moz-file-promise-dest-filename (or one of
the other ones) might hold the file name where the image is?  Does

(gui-get-selection 'CLIPBOARD 'application/x-moz-file-promise-dest-filename)

return anything?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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