emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] yank-media doesn't work
@ 2024-12-02 21:50 the_wurfkreuz via General discussions about Org-mode.
  2024-12-13  6:34 ` Visuwesh
  0 siblings, 1 reply; 9+ messages in thread
From: the_wurfkreuz via General discussions about Org-mode. @ 2024-12-02 21:50 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

When using the yank-media command to paste images, the results are inconsistent. This issue persists even when running Emacs with emacs -Q.

In some instances, the command successfully pastes the image.
At other times, it fails with the message: "yank-media: No handler in the current buffer for anything on the clipboard."
Alternatively, it may display: "Timed out waiting for property-notify event."

Occasionally, attempting the command twice in quick succession results in success on the second attempt, though this is rare.
Copying images directly from a web browser using the "Copy Image" option generally works without issue.However, copying images using the command grim -g "$(slurp)" - | wl-copy or from Telegram often results in the aforementioned errors.
Emacs : GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)
Package: Org mode version 9.8-pre (release_9.7.16-169-ge87ecf)

[-- Attachment #2: Type: text/html, Size: 1337 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-02 21:50 [BUG] yank-media doesn't work the_wurfkreuz via General discussions about Org-mode.
@ 2024-12-13  6:34 ` Visuwesh
  2024-12-16 14:54   ` the_wurfkreuz via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Visuwesh @ 2024-12-13  6:34 UTC (permalink / raw)
  To: the_wurfkreuz via General discussions about Org-mode.; +Cc: the_wurfkreuz

[திங்கள் டிசம்பர் 02, 2024] the_wurfkreuz via "General discussions about Org-mode." wrote:

> When using the yank-media command to paste images, the results are
> inconsistent. This issue persists even when running Emacs with emacs
> -Q.
>
> In some instances, the command successfully pastes the image.
> At other times, it fails with the message: "yank-media: No handler in
> the current buffer for anything on the clipboard."
> Alternatively, it may display: "Timed out waiting for property-notify event."
>
> Occasionally, attempting the command twice in quick succession results
> in success on the second attempt, though this is rare.
> Copying images directly from a web browser using the "Copy Image"
> option generally works without issue.However, copying images using the
> command grim -g "$(slurp)" - | wl-copy or from Telegram often results
> in the aforementioned errors.
> Emacs : GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)
> Package: Org mode version 9.8-pre (release_9.7.16-169-ge87ecf)

I am assuming that you're running the PGTK build.  I am quite sure this
is the same bug as bug#72254.  How recent is the build of your Emacs 30?
Does it include the fix for bug#72254: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=11e7ae3964e192b0e4bcc437a04278ee727e720b


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-13  6:34 ` Visuwesh
@ 2024-12-16 14:54   ` the_wurfkreuz via General discussions about Org-mode.
  2024-12-16 20:32     ` the_wurfkreuz via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: the_wurfkreuz via General discussions about Org-mode. @ 2024-12-16 14:54 UTC (permalink / raw)
  To: Visuwesh; +Cc: the_wurfkreuz via "General discussions about Org-mode."

> [திங்கள் டிசம்பர் 02, 2024] the_wurfkreuz via "General discussions about Org-mode." wrote:
> 
> > When using the yank-media command to paste images, the results are
> > inconsistent. This issue persists even when running Emacs with emacs
> > -Q.
> > 
> > In some instances, the command successfully pastes the image.
> > At other times, it fails with the message: "yank-media: No handler in
> > the current buffer for anything on the clipboard."
> > Alternatively, it may display: "Timed out waiting for property-notify event."
> > 
> > Occasionally, attempting the command twice in quick succession results
> > in success on the second attempt, though this is rare.
> > Copying images directly from a web browser using the "Copy Image"
> > option generally works without issue.However, copying images using the
> > command grim -g "$(slurp)" - | wl-copy or from Telegram often results
> > in the aforementioned errors.
> > Emacs : GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)
> > Package: Org mode version 9.8-pre (release_9.7.16-169-ge87ecf)
> 
> 
> I am assuming that you're running the PGTK build. I am quite sure this
> is the same bug as bug#72254. How recent is the build of your Emacs 30?
> Does it include the fix for bug#72254: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=11e7ae3964e192b0e4bcc437a04278ee727e720b

Compiled to the latest version 'GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-12-16' and for now it looks like the problem is gone.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-16 14:54   ` the_wurfkreuz via General discussions about Org-mode.
@ 2024-12-16 20:32     ` the_wurfkreuz via General discussions about Org-mode.
  2024-12-16 21:15       ` the_wurfkreuz via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: the_wurfkreuz via General discussions about Org-mode. @ 2024-12-16 20:32 UTC (permalink / raw)
  To: Visuwesh; +Cc: the_wurfkreuz via "General discussions about Org-mode."

Ah, no, the problem is still here.

> I am assuming that you're running the PGTK build

I compiled emacs with gtk3:

 ./configure --with-tree-sitter \
    --with-gif --with-png --with-jpeg --with-tiff \
    --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets \
    --without-rsvg \
    WEBKIT_CFLAGS="$(pkg-config --cflags webkit2gtk-4.1)" \
    WEBKIT_LIBS="$(pkg-config --libs webkit2gtk-4.1)" \
    CPPFLAGS="-I/usr/lib/gcc/x86_64-linux-gnu/14/include" \
    --with-mailutils

I'm running emacs on wayland.


On Monday, December 16th, 2024 at 17:54, the_wurfkreuz <the_wurfkreuz@proton.me> wrote:

> > [திங்கள் டிசம்பர் 02, 2024] the_wurfkreuz via "General discussions about Org-mode." wrote:
> > 
> > > When using the yank-media command to paste images, the results are
> > > inconsistent. This issue persists even when running Emacs with emacs
> > > -Q.
> > > 
> > > In some instances, the command successfully pastes the image.
> > > At other times, it fails with the message: "yank-media: No handler in
> > > the current buffer for anything on the clipboard."
> > > Alternatively, it may display: "Timed out waiting for property-notify event."
> > > 
> > > Occasionally, attempting the command twice in quick succession results
> > > in success on the second attempt, though this is rare.
> > > Copying images directly from a web browser using the "Copy Image"
> > > option generally works without issue.However, copying images using the
> > > command grim -g "$(slurp)" - | wl-copy or from Telegram often results
> > > in the aforementioned errors.
> > > Emacs : GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)
> > > Package: Org mode version 9.8-pre (release_9.7.16-169-ge87ecf)
> > 
> > I am assuming that you're running the PGTK build. I am quite sure this
> > is the same bug as bug#72254. How recent is the build of your Emacs 30?
> > Does it include the fix for bug#72254: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=11e7ae3964e192b0e4bcc437a04278ee727e720b
> 
> 
> Compiled to the latest version 'GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-12-16' and for now it looks like the problem is gone.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-16 20:32     ` the_wurfkreuz via General discussions about Org-mode.
@ 2024-12-16 21:15       ` the_wurfkreuz via General discussions about Org-mode.
  2024-12-19  5:24         ` Visuwesh
  0 siblings, 1 reply; 9+ messages in thread
From: the_wurfkreuz via General discussions about Org-mode. @ 2024-12-16 21:15 UTC (permalink / raw)
  To: Visuwesh; +Cc: the_wurfkreuz via "General discussions about Org-mode."


Also, it seems as if the bug is easier to trigger if i copy an image from teleram in comparison to other things i've tried. But i'm not completely sure about this.


-------- Оригинальное Сообщение --------
16.12.2024 23:32, the_wurfkreuz <the_wurfkreuz@proton.me> написал:

>  Ah, no, the problem is still here.
>  
>  > I am assuming that you're running the PGTK build
>  
>  I compiled emacs with gtk3:
>  
>   ./configure --with-tree-sitter \
>      --with-gif --with-png --with-jpeg --with-tiff \
>      --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets \
>      --without-rsvg \
>      WEBKIT_CFLAGS="$(pkg-config --cflags webkit2gtk-4.1)" \
>      WEBKIT_LIBS="$(pkg-config --libs webkit2gtk-4.1)" \
>      CPPFLAGS="-I/usr/lib/gcc/x86_64-linux-gnu/14/include" \
>      --with-mailutils
>  
>  I'm running emacs on wayland.
>  
>  
>  On Monday, December 16th, 2024 at 17:54, the_wurfkreuz <the_wurfkreuz@proton.me> wrote:
>  
>  > > [திங்கள் டிசம்பர் 02, 2024] the_wurfkreuz via "General discussions about Org-mode." wrote:
>  > >
>  > > > When using the yank-media command to paste images, the results are
>  > > > inconsistent. This issue persists even when running Emacs with emacs
>  > > > -Q.
>  > > >
>  > > > In some instances, the command successfully pastes the image.
>  > > > At other times, it fails with the message: "yank-media: No handler in
>  > > > the current buffer for anything on the clipboard."
>  > > > Alternatively, it may display: "Timed out waiting for property-notify event."
>  > > >
>  > > > Occasionally, attempting the command twice in quick succession results
>  > > > in success on the second attempt, though this is rare.
>  > > > Copying images directly from a web browser using the "Copy Image"
>  > > > option generally works without issue.However, copying images using the
>  > > > command grim -g "$(slurp)" - | wl-copy or from Telegram often results
>  > > > in the aforementioned errors.
>  > > > Emacs : GNU Emacs 30.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0)
>  > > > Package: Org mode version 9.8-pre (release_9.7.16-169-ge87ecf)
>  > >
>  > > I am assuming that you're running the PGTK build. I am quite sure this
>  > > is the same bug as bug#72254. How recent is the build of your Emacs 30?
>  > > Does it include the fix for bug#72254: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=11e7ae3964e192b0e4bcc437a04278ee727e720b
>  >
>  >
>  > Compiled to the latest version 'GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-12-16' and for now it looks like the problem is gone.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-16 21:15       ` the_wurfkreuz via General discussions about Org-mode.
@ 2024-12-19  5:24         ` Visuwesh
  2024-12-26 15:31           ` the_wurfkreuz via General discussions about Org-mode.
  0 siblings, 1 reply; 9+ messages in thread
From: Visuwesh @ 2024-12-19  5:24 UTC (permalink / raw)
  To: the_wurfkreuz
  Cc: the_wurfkreuz via "General discussions about Org-mode."

[Monday December 16, 2024] the_wurfkreuz wrote:

> Also, it seems as if the bug is easier to trigger if i copy an image
> from teleram in comparison to other things i've tried. But i'm not
> completely sure about this.
>
>
> -------- Оригинальное Сообщение --------
> 16.12.2024 23:32, the_wurfkreuz <the_wurfkreuz@proton.me> написал:
>
>>  Ah, no, the problem is still here.
>>  
>>  > I am assuming that you're running the PGTK build
>>  
>>  I compiled emacs with gtk3:
>>  
>>   ./configure --with-tree-sitter \
>>      --with-gif --with-png --with-jpeg --with-tiff \
>>      --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets \
>>      --without-rsvg \
>>      WEBKIT_CFLAGS="$(pkg-config --cflags webkit2gtk-4.1)" \
>>      WEBKIT_LIBS="$(pkg-config --libs webkit2gtk-4.1)" \
>>      CPPFLAGS="-I/usr/lib/gcc/x86_64-linux-gnu/14/include" \
>>      --with-mailutils
>>  
>>  I'm running emacs on wayland.
>>  

I am on Xorg and using the Lucid toolkit.  I cannot reproduce this when
I copy an image from Telegram.  When you get this again, could you try
evaluating

    (gui-get-selection 'CLIPBOARD 'TARGETS)

?  If you can find a reliable reproducer from emacs -Q, please file a
bug report with the reproduction steps clearly written using M-x
report-emacs-bug RET as this is clearly an Emacs bug, not an Org one.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-19  5:24         ` Visuwesh
@ 2024-12-26 15:31           ` the_wurfkreuz via General discussions about Org-mode.
  2024-12-27  9:01             ` Visuwesh
  0 siblings, 1 reply; 9+ messages in thread
From: the_wurfkreuz via General discussions about Org-mode. @ 2024-12-26 15:31 UTC (permalink / raw)
  To: Visuwesh; +Cc: the_wurfkreuz via "General discussions about Org-mode."

It gives this:

[TIMESTAMP TARGETS SAVE_TARGETS MULTIPLE STRING UTF8_STRING TEXT chromium/x-source-url text/html text/plain text/plain\;charset=utf-8]

Also, it works correctly if i switch from wayland to X11.



On Thursday, December 19th, 2024 at 8:24, Visuwesh <visuweshm@gmail.com> wrote:

> [Monday December 16, 2024] the_wurfkreuz wrote:
>
> > Also, it seems as if the bug is easier to trigger if i copy an image
> > from teleram in comparison to other things i've tried. But i'm not
> > completely sure about this.
> >
> > -------- Оригинальное Сообщение --------
> > 16.12.2024 23:32, the_wurfkreuz the_wurfkreuz@proton.me написал:
> >
> > > Ah, no, the problem is still here.
> > >
> > > > I am assuming that you're running the PGTK build
> > >
> > > I compiled emacs with gtk3:
> > >
> > > ./configure --with-tree-sitter \
> > > --with-gif --with-png --with-jpeg --with-tiff \
> > > --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets \
> > > --without-rsvg \
> > > WEBKIT_CFLAGS="$(pkg-config --cflags webkit2gtk-4.1)" \
> > > WEBKIT_LIBS="$(pkg-config --libs webkit2gtk-4.1)" \
> > > CPPFLAGS="-I/usr/lib/gcc/x86_64-linux-gnu/14/include" \
> > > --with-mailutils
> > >
> > > I'm running emacs on wayland.
>
>
> I am on Xorg and using the Lucid toolkit. I cannot reproduce this when
> I copy an image from Telegram. When you get this again, could you try
> evaluating
>
> (gui-get-selection 'CLIPBOARD 'TARGETS)
>
> ? If you can find a reliable reproducer from emacs -Q, please file a
> bug report with the reproduction steps clearly written using M-x
> report-emacs-bug RET as this is clearly an Emacs bug, not an Org one.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-26 15:31           ` the_wurfkreuz via General discussions about Org-mode.
@ 2024-12-27  9:01             ` Visuwesh
  2024-12-27  9:09               ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Visuwesh @ 2024-12-27  9:01 UTC (permalink / raw)
  To: the_wurfkreuz
  Cc: the_wurfkreuz via "General discussions about Org-mode."

[வியாழன் டிசம்பர் 26, 2024] the_wurfkreuz wrote:

> It gives this:
>
> [TIMESTAMP TARGETS SAVE_TARGETS MULTIPLE STRING UTF8_STRING TEXT chromium/x-source-url text/html text/plain text/plain\;charset=utf-8]

No wonder nothing happened.  There's no image/* element here so we
cannot do anything here.  What does text/html contain?  (But I do not
want to go into the rabbit hole of extracting the image from the HTML
string, and insert it, etc.  I will delegate the job to someone more
strong-willed than me.)

> Also, it works correctly if i switch from wayland to X11.

Are non-PGTK configurations supported outside of X11?  I would assume
not.  This could be a source of trouble too.

In any case, nothing much can be done from Org's side.  This is clearly
an Emacs bug (or a mismatch of user environment and toolkit).


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [BUG] yank-media doesn't work
  2024-12-27  9:01             ` Visuwesh
@ 2024-12-27  9:09               ` Ihor Radchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Ihor Radchenko @ 2024-12-27  9:09 UTC (permalink / raw)
  To: Visuwesh
  Cc: the_wurfkreuz,
	the_wurfkreuz via General discussions about Org-mode.

Visuwesh <visuweshm@gmail.com> writes:

> In any case, nothing much can be done from Org's side.  This is clearly
> an Emacs bug (or a mismatch of user environment and toolkit).

So...
Canceled.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-12-27  9:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 21:50 [BUG] yank-media doesn't work the_wurfkreuz via General discussions about Org-mode.
2024-12-13  6:34 ` Visuwesh
2024-12-16 14:54   ` the_wurfkreuz via General discussions about Org-mode.
2024-12-16 20:32     ` the_wurfkreuz via General discussions about Org-mode.
2024-12-16 21:15       ` the_wurfkreuz via General discussions about Org-mode.
2024-12-19  5:24         ` Visuwesh
2024-12-26 15:31           ` the_wurfkreuz via General discussions about Org-mode.
2024-12-27  9:01             ` Visuwesh
2024-12-27  9:09               ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).