From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#72254: 29.4; Cannot yank media when image come from Gnome-shell screenshot Date: Tue, 23 Jul 2024 19:00:34 +0200 Message-ID: <871q3k9h71.fsf@gmail.com> References: <87y15sqstb.fsf@k-7.ch> <87wmlc9wvz.fsf@gmail.com> <87plr4qpqy.fsf@k-7.ch> <87o76o9tvl.fsf@gmail.com> <87ed7kqoe4.fsf@k-7.ch> <87ed7k9srp.fsf@gmail.com> <87ttggp8e0.fsf@k-7.ch> <87a5i89run.fsf@gmail.com> <87le1sp7ts.fsf@k-7.ch> <875xsw9nac.fsf@gmail.com> <87ikww3w4s.fsf@gmail.com> <87a5i8oyax.fsf@k-7.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 72254@debbugs.gnu.org, Visuwesh To: =?UTF-8?Q?S=C3=A9bastien?= Gendre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 23 19:02:30 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sWIuE-0008LD-B9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 23 Jul 2024 19:02:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWIty-0002uv-I1; Tue, 23 Jul 2024 13:02:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWItm-0002u2-7I for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:02:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sWIth-0005oM-RP for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:02:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWItm-0004KQ-AQ for bug-gnu-emacs@gnu.org; Tue, 23 Jul 2024 13:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2024 17:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72254 X-GNU-PR-Package: emacs Original-Received: via spool by 72254-submit@debbugs.gnu.org id=B72254.172175410516616 (code B ref 72254); Tue, 23 Jul 2024 17:02:02 +0000 Original-Received: (at 72254) by debbugs.gnu.org; 23 Jul 2024 17:01:45 +0000 Original-Received: from localhost ([127.0.0.1]:60633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWItV-0004Jw-AC for submit@debbugs.gnu.org; Tue, 23 Jul 2024 13:01:45 -0400 Original-Received: from mail-wm1-f44.google.com ([209.85.128.44]:57357) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWItR-0004Jm-Ib for 72254@debbugs.gnu.org; Tue, 23 Jul 2024 13:01:44 -0400 Original-Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-427d8f1f363so32599255e9.2 for <72254@debbugs.gnu.org>; Tue, 23 Jul 2024 10:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721754036; x=1722358836; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JJWADtjIlVCwp5SKi47r1wJcRtpgMuyKZqai22P1H5w=; b=gk6ks2udyxMARhci1s3YGgK19pBXWe9OFVv5n2sV3ICkBT9wmOOrLR1qIgg2hPCGfM cZduxoCY21Ot9HzQkoeOsRtXpjSRJcIRhulfEZkSAaj2NsBLz1qnyL7H/4prWSyBIJFA BkZS0qvI7jRZviL2Qr38AEy4JawG6bcK0+nXh3SezYO85yBwIDa9PhTO8NiFjJMW3fLl sLE6dxnUPVUUrePEtZ0ZadE+KNAoklZJxbXqa8xwRBClBcz2KD5oye/oQj7I+9VYn5Bq KKnv91Fpz+OlleKw8ngC6O7sbHKzWorv9hZ1ykzeJsaS7lgj8ULIKhyPMv0D0hVL/m9/ pojw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721754036; x=1722358836; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JJWADtjIlVCwp5SKi47r1wJcRtpgMuyKZqai22P1H5w=; b=aUKY+910lFLF1qZuM4/2YI59igmBJWSNwZ7pIFyvHMcV/gxEmZ1RntTOkCZclryKXx eghEz72AaAaPHsic475jEaReJ5vxZPnNptJlR5KcTZkZmyfIdZUU7dLw3KEmkgtFGIWM b0xhGBQ80y1bnUuNy53f/o2Km+OiZSRsyMZECfBrLoVgs4iE1PU1MaPdlk//gyjtvZFp tp/8/50Xye94q7tuHdXJ3gxcFX9jUJo3vEFOid1owMxI9C+TEk5IXaoEWk+inHmC9Ada HuvW0PQZS7ISBXIO2fLbdXhFmam9GGukjNhQalxQasTlewBeSHBuOvmfkKEk9HC+Ln/v HENw== X-Forwarded-Encrypted: i=1; AJvYcCWEA65UyjNA3sDXRI2grwJJNu5RlqjvmAIKQ9CBwfHw43cc3+iNOZLBKwTswRqvOHGj9w6LTbgdQ5WS0k4XF+39IQEbPNA= X-Gm-Message-State: AOJu0YwSU45+RNvc+dwyyrFae7Y76A/CG+KEN81XHokzrvMcdi8U74uR 8lEqYq78nUAx5puTK9Y5nBY/l5jBSLVTNMgAXgxOz8h6oD14lclFYntZdQ== X-Google-Smtp-Source: AGHT+IGoGRJ9WsdbK2mRinnoVVN+2xyQQp9BJKF7ArO2tYCombLEpFNM8oGcCcS4TKiWDPdzkRYb0Q== X-Received: by 2002:a05:600c:1388:b0:426:6455:f124 with SMTP id 5b1f17b1804b1-427dc4700acmr86294865e9.0.1721754035449; Tue, 23 Jul 2024 10:00:35 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427d6697c3fsm181532705e9.0.2024.07.23.10.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jul 2024 10:00:34 -0700 (PDT) In-Reply-To: <87a5i8oyax.fsf@k-7.ch> ("=?UTF-8?Q?S=C3=A9bastien?= Gendre"'s message of "Tue, 23 Jul 2024 18:41:58 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:289180 Archived-At: >>>>> On Tue, 23 Jul 2024 18:41:58 +0200, S=C3=A9bastien Gendre said: S=C3=A9bastien> Yes, the Emacs version in Fedora repo is PGTK. And I us= e Wayland. Ah, that would have been good to know from the beginning. S=C3=A9bastien> But if I copy an image to clipboard from Firefox, I can= past it into an S=C3=A9bastien> org-mode buffer with `yank-media`. Try this `cl-defmethod' instead. diff --git a/lisp/term/pgtk-win.el b/lisp/term/pgtk-win.el index 505174048f6..d0dbf11cc48 100644 --- a/lisp/term/pgtk-win.el +++ b/lisp/term/pgtk-win.el @@ -140,6 +140,15 @@ gui-backend-get-selection &context (window-system pgtk)) (pgtk-get-selection-internal selection-symbol target-type)) =20 +(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 + time-stamp terminal))) + (if (vectorp sel) + sel + (vector sel)))) + =20 (defvar pgtk-preedit-overlay nil) =20 Robert --=20