all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: "Sébastien Gendre" <seb@k-7.ch>
Cc: Eli Zaretskii <eliz@gnu.org>, 72254@debbugs.gnu.org
Subject: bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot
Date: Tue, 23 Jul 2024 14:26:38 +0200	[thread overview]
Message-ID: <87o76o9tvl.fsf@gmail.com> (raw)
In-Reply-To: <87plr4qpqy.fsf@k-7.ch> ("Sébastien Gendre"'s message of "Tue, 23 Jul 2024 14:03:49 +0200")

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

    Sébastien> Robert Pluim <rpluim@gmail.com> writes:
    >> If instead of running `yank-media' at this point, what happens if you
    >> evaluate:
    >> 
    >> (gui-get-selection 'CLIPBOARD 'TARGETS)

    Sébastien> If I evaluate this, I get the result:

    Sébastien> image/png

Hmm, thatʼs supposed to be a vector, not a symbol. Could you try the
following patch and see if it improves things?

diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index ced2750202b..cc952672580 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1370,6 +1370,16 @@ gui-backend-get-selection
   (x-get-selection-internal selection-symbol target-type
                             time-stamp terminal))
 
+(cl-defmethod gui-backend-get-selection ((selection-symbol (eql 'CLIPBOARD))
+                                         (target-type (eql 'TARGETS))
+                                         &context (window-system x)
+                                         &optional time-stamp terminal)
+  (let ((sel (x-get-selection-internal selection-symbol target-type
+                                       time-stamp terminal)))
+    (if (vectorp sel)
+        sel
+      (vector sel))))
+
 ;; Initiate drag and drop
 (add-hook 'after-make-frame-functions 'x-dnd-init-frame)
 (define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)


Robert
-- 





  parent reply	other threads:[~2024-07-23 12:26 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 [this message]
     [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
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o76o9tvl.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=72254@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=seb@k-7.ch \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.