From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: alan@idiocy.org, emacs-devel@gnu.org
Subject: Re: `M-x yank-media'
Date: Sun, 07 Nov 2021 15:42:51 +0200 [thread overview]
Message-ID: <83mtmg84kk.fsf@gnu.org> (raw)
In-Reply-To: <87sfw8jdl1.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 07 Nov 2021 14:32:42 +0100)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org, Alan Third <alan@idiocy.org>
> Date: Sun, 07 Nov 2021 14:32:42 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > What does this require from the clipboard to work? What are the
> > assumptions?
>
> It's basically this on GNU/Linux:
>
> (gui-get-selection 'CLIPBOARD 'TARGETS)
> =>
> [TIMESTAMP TARGETS MULTIPLE SAVE_TARGETS text/html text/_moz_htmlinfo text/_moz_htmlcontext image/png image/jpeg image/bmp image/x-bmp image/x-MS-bmp image/x-icon image/x-ico image/x-win-bitmap image/vnd\.microsoft\.icon application/ico image/ico image/icon text/ico image/tiff]
>
> This lists the available media types.
But those are just the types. How do we fetch the stuff afterwards?
> 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.
> > AFAIK, that's what "other applications" do: they paste the content
> > from the clipboard regardless of the type. Fine-tuned behavior, where
> > the user can select exactly what he/she wants to past and how, is then
> > available from a context menu.
>
> Yes, but it would just be too surprising in an Emacs context, in my
> opinion. Changing how something as fundamental as `C-y' works here
> would potentially be extremely annoying.
Let's see what others think.
next prev parent reply other threads:[~2021-11-07 13:42 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-06 21:05 `M-x yank-media' Lars Ingebrigtsen
2021-11-06 23:09 ` H. Dieter Wilhelm
2021-11-07 3:05 ` [External] : " Drew Adams
2021-11-07 1:23 ` T.V Raman
2021-11-07 10:02 ` Eli Zaretskii
2021-11-07 13:12 ` Lars Ingebrigtsen
2021-11-07 13:21 ` Eli Zaretskii
2021-11-07 13:32 ` Lars Ingebrigtsen
2021-11-07 13:38 ` Po Lu
2021-11-07 13:45 ` Lars Ingebrigtsen
2021-11-08 0:56 ` Po Lu
2021-11-08 1:10 ` Lars Ingebrigtsen
2021-11-08 2:12 ` Po Lu
2021-11-07 13:42 ` Eli Zaretskii [this message]
2021-11-07 13:48 ` Lars Ingebrigtsen
2021-11-07 13:57 ` Eli Zaretskii
2021-11-07 14:04 ` Lars Ingebrigtsen
2021-11-07 14:08 ` Stefan Monnier
2021-11-07 14:11 ` Lars Ingebrigtsen
2021-11-07 14:09 ` Eli Zaretskii
2021-11-07 14:13 ` Lars Ingebrigtsen
2021-11-23 23:42 ` Alan Third
2021-11-24 7:14 ` Lars Ingebrigtsen
2021-11-24 10:59 ` Alan Third
2021-11-24 16:45 ` Lars Ingebrigtsen
2021-11-25 0:53 ` Po Lu
2021-11-25 13:37 ` Lars Ingebrigtsen
2021-11-08 3:07 ` Richard Stallman
2021-11-08 4:55 ` Lars Ingebrigtsen
2021-11-08 5:09 ` Lars Ingebrigtsen
2021-11-08 14:29 ` Eli Zaretskii
2021-11-09 3:39 ` Lars Ingebrigtsen
2021-11-08 16:56 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mtmg84kk.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=alan@idiocy.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).