unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Sébastien Gendre" <seb@k-7.ch>
Cc: Po Lu <luangruo@yahoo.com>, Eli Zaretskii <eliz@gnu.org>,
	72254@debbugs.gnu.org, Visuwesh <visuweshm@gmail.com>
Subject: bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot
Date: Wed, 24 Jul 2024 09:16:49 +0200	[thread overview]
Message-ID: <87wmlb8djy.fsf@gmail.com> (raw)
In-Reply-To: <87sew058rc.fsf@k-7.ch> ("Sébastien Gendre"'s message of "Tue, 23 Jul 2024 19:16:23 +0200")

>>>>> On Tue, 23 Jul 2024 19:16:23 +0200, Sébastien Gendre <seb@k-7.ch> said:

    Sébastien> If I evaluate this `cl-defmethod', and then evaluate (gui-get-selection
    Sébastien> 'CLIPBOARD 'TARGETS) from an Org-mode buffer after taking an screenshot,
    Sébastien> I get this error:

My bad. Try this instead:

diff --git a/lisp/term/pgtk-win.el b/lisp/term/pgtk-win.el
index 505174048f6..06f962ff714 100644
--- a/lisp/term/pgtk-win.el
+++ b/lisp/term/pgtk-win.el
@@ -140,6 +140,14 @@ gui-backend-get-selection
                                          &context (window-system pgtk))
   (pgtk-get-selection-internal selection-symbol target-type))
 
+(cl-defmethod gui-backend-get-selection ((selection-symbol (eql 'CLIPBOARD))
+                                         (target-type (eql 'TARGETS))
+                                         &context (window-system pgtk))
+  (let ((sel (pgtk-get-selection-internal selection-symbol target-type)))
+    (if (vectorp sel)
+        sel
+      (vector sel))))
+
 
 (defvar pgtk-preedit-overlay nil)
 

Po Lu, is this the right level to fix this? Or should we handle
'CLIPBOARD + 'TARGETS specially in `pgtk-get-selection-internal'? (And
maybe we should add "&optional time_stamp terminal" to the
`cl-defmethods' in pgtk-win.el)

Robert
-- 





  parent reply	other threads:[~2024-07-24  7:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 10:57 bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot Sébastien Gendre
2024-07-23 11:21 ` Robert Pluim
2024-07-23 11:52   ` Eli Zaretskii
     [not found]   ` <87plr4qpqy.fsf@k-7.ch>
2024-07-23 12:26     ` Robert Pluim
     [not found]       ` <87ed7kqoe4.fsf@k-7.ch>
2024-07-23 12:50         ` Robert Pluim
     [not found]           ` <87ttggp8e0.fsf@k-7.ch>
2024-07-23 13:10             ` Robert Pluim
     [not found]               ` <87le1sp7ts.fsf@k-7.ch>
2024-07-23 14:48                 ` Robert Pluim
2024-07-23 16:34                   ` Visuwesh
     [not found]                     ` <87a5i8oyax.fsf@k-7.ch>
2024-07-23 17:00                       ` Robert Pluim
     [not found]                         ` <87sew058rc.fsf@k-7.ch>
2024-07-24  7:16                           ` Robert Pluim [this message]
2024-07-24  9:29                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-24 10:50                               ` Robert Pluim
2024-07-24 12:12                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-24 13:35                                   ` Robert Pluim
2024-07-24 14:11                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-20 10:12                                       ` Robert Pluim
2024-08-20 12:18                                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-20 13:15                                           ` Eli Zaretskii
2024-08-20 13:20                                             ` Robert Pluim
2024-08-20 13:30                                               ` Eli Zaretskii
2024-08-20 13:59                                                 ` Robert Pluim
2024-08-20 14:01                                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-20 14:25                                                   ` Eli Zaretskii
2024-08-20 15:17                                                     ` Robert Pluim
2024-08-21  2:37                                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-21 13:47                                                       ` Eli Zaretskii
2024-08-24 14:03                                                         ` Andrea Corallo
2024-09-12  0:20                                                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]                             ` <87wmlbul4a.fsf@k-7.ch>
2024-07-24 10:55                               ` Robert Pluim

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=87wmlb8djy.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=72254@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    --cc=seb@k-7.ch \
    --cc=visuweshm@gmail.com \
    /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).