GNU bug report logs -
#71909
30.0.60; Can not use yank-media for pasting image from clipboad in org-mode on Windows platform
Previous Next
Reported by: Eason Huang <aqua0210 <at> foxmail.com>
Date: Wed, 3 Jul 2024 04:47:01 UTC
Severity: wishlist
Found in version 30.0.60
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 71909 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 5 Oct 2024 23:24:09 +0200
> From: Cecilio Pardo <cpardo <at> imayhem.com>
> Cc: 71909 <at> debbugs.gnu.org
>
> On 05/10/2024 21:31, Eli Zaretskii wrote:
>
> > If you invoke "M-: (gui-get-selection 'CLIPBOARD 'TARGETS) RET" after
> > copying something to the clipboard, you will see some very weird
> > format names there. For the standard formats, we convert them to
> > something similar to what X Window system produces (see
> > w32-selection-targets), but the rest are returned as-is. For example,
> > after copying an image from Firefox, I get this as the return value of
> > the above evaluation:
> >
> > [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]
> >
> > There's no image/* here, only DIB and BITMAP (which correspond to
> > CF_DIB and CF_BITMAP clipboard formats). There are also a lot of
> > text/* formats, but they are all non-standard, except, perhaps,
> > text/html. Do you have ideas how to select the proper format and how
> > to yank the data?
>
> > What do the x/special-* formats correspond to on Windows?
>
> We would convert the BITMAP format to image/png
But BITMAP is not PNG, AFAIU. Moreover, with some images, when I copy
them in a Web browser, I see "PNG" in the targets vector reported by
gui-get-selection. So I think we need to understand what exactly we
get with each format before we decide on the mapping.
As another data point. text/html seems to be Firefox-specific thing;
the standard Windows name for this is "HTML Format" (with the embedded
space).
> and FILE_NAMES to
> x-special/gnome-copied-files, to be compatible with what org-mode does
> now. The offer to yank-media would then be text/html, image/png, and
> x-special/gnome-copied-files, ignoring the rest of formats.
I don't like the Gnome-specific name x-special/gnome-copied-files.
I'd rather we produced a more generic name, and then ask the Org
developers to add support for it.
What about other kinds of media, like audio and video data? Is that
supported, and if so, can we include that in some way?
This bug report was last modified 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.