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: Wed, 24 Jul 2024 09:16:49 +0200 Message-ID: <87wmlb8djy.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> <871q3k9h71.fsf@gmail.com> <87sew058rc.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="25413"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Po Lu , 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 Wed Jul 24 09:19:26 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 1sWWHU-0006Pt-KT for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jul 2024 09:19:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWWH5-0007Yy-H0; Wed, 24 Jul 2024 03:18:59 -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 1sWWH3-0007YV-6o for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2024 03:18:57 -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 1sWWH2-0007pi-TF for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2024 03:18:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWWH7-0000qM-RI for bug-gnu-emacs@gnu.org; Wed, 24 Jul 2024 03:19:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jul 2024 07:19:01 +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.17218054833164 (code B ref 72254); Wed, 24 Jul 2024 07:19:01 +0000 Original-Received: (at 72254) by debbugs.gnu.org; 24 Jul 2024 07:18:03 +0000 Original-Received: from localhost ([127.0.0.1]:33038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWWGA-0000oy-Te for submit@debbugs.gnu.org; Wed, 24 Jul 2024 03:18:03 -0400 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:48267) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWWG6-0000oX-Tm for 72254@debbugs.gnu.org; Wed, 24 Jul 2024 03:18:01 -0400 Original-Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-42793fc0a6dso46385645e9.0 for <72254@debbugs.gnu.org>; Wed, 24 Jul 2024 00:17:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721805412; x=1722410212; 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=5/0VN+XX/5gIdDMnNO+M/SEBJoTXjlPmR3JLQkRMCFE=; b=Rpcbic71JQb83idmiMhJcMPvWkI9kYMcU9jTzdQJyk/im1lVrJ8aasFVSX2K04LEjX 8r0GdNl9lsxnqKquVqpTKpgXmit0epd9REPCak/rPt6aRJmE8/07MlWphb0iuuYXcWKu t0qYyxpNOHOafzuCXUfEW0FkZF0ChhW8nSxzCt7SujN0eLD064P1NxzlhrAujtU69glm kwYGhFyWTRIu/7EOqpAtkUGq6LvA5MJ3KOI0mXxKi92Jkwdw8gEMtyGCpdn4AD218BCI f7fIs1LpgW/glTtRn81Ed59WPvxC/0e5H3B7yGfJUI0H/gW+0TpQKwMIS6wib0pMUxVU ppFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721805412; x=1722410212; 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=5/0VN+XX/5gIdDMnNO+M/SEBJoTXjlPmR3JLQkRMCFE=; b=qMMecGOQb36XdK5Pl1yr8BECzBrSFpmN2O4jFw01KIpBf0i9+tshcscpx0SyppO/bO xRpl4ZA/x2leQ3mZxnmb+e8u+nO0WHrM6VIPM7fXQ5w26UabLR6BGmA9YoQfLLYMPEzm XZ0FlRNvhApLw+54UfJvq9qhYJJNUffWdoVvBUk/CozD2DJ729DBLp/rq5r96rhD1kGb WW1m8WHiMLirsqfAh14VZB+K4HJVIx8QD9EbuO/iUg7qSWxcpt03TOhvwXyAeE0KyVg/ T+nFydP90PZab5bo8ZWxDgYaW5dIfqdi03OxPRtEw+OHNasrjsba9BE56TAcl0DfV2+9 RZUQ== X-Forwarded-Encrypted: i=1; AJvYcCUL43Nx7MFOn6QezJhQvLeuC7nBdN5OLE7e2J8BhrnzONfh43IX6oeBMQg66mpycVSnhQcfxXFn1tm6LiaoLcszeQZTGa4= X-Gm-Message-State: AOJu0YzWc2otYtGva6vQakGF4l9Ph6O5fvspuePv5nWRTyJGPWTvuz/H ys6QkXt6t+bFdP4EgsuvVtyBvzrTke4dx+r8npb5SrpDlfHM3JKTNWaN1Q== X-Google-Smtp-Source: AGHT+IERaNL+Emp446jHjd9+ny9pCmp8/bBbd15P3vmyiXwfKgYTTCflTFSfMv8fk8cBcMcNJwAHuQ== X-Received: by 2002:a05:600c:4fd5:b0:426:62a0:eb6b with SMTP id 5b1f17b1804b1-427f9558ec3mr8264855e9.13.1721805412196; Wed, 24 Jul 2024 00:16:52 -0700 (PDT) Original-Received: from rltb ([82.66.8.55]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427f935dc32sm15719995e9.7.2024.07.24.00.16.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 00:16:51 -0700 (PDT) In-Reply-To: <87sew058rc.fsf@k-7.ch> ("=?UTF-8?Q?S=C3=A9bastien?= Gendre"'s message of "Tue, 23 Jul 2024 19:16:23 +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:289204 Archived-At: >>>>> On Tue, 23 Jul 2024 19:16:23 +0200, S=C3=A9bastien Gendre said: S=C3=A9bastien> If I evaluate this `cl-defmethod', and then evaluate (g= ui-get-selection S=C3=A9bastien> 'CLIPBOARD 'TARGETS) from an Org-mode buffer after taki= ng an screenshot, S=C3=A9bastien> 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)) =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))) + (if (vectorp sel) + sel + (vector sel)))) + =20 (defvar pgtk-preedit-overlay nil) =20 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 --=20