From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id iGEbI8dwk2cnYQEAe85BDQ:P1 (envelope-from ) for ; Fri, 24 Jan 2025 10:51:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id iGEbI8dwk2cnYQEAe85BDQ (envelope-from ) for ; Fri, 24 Jan 2025 11:51:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=InhWJYNm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1737715911; a=rsa-sha256; cv=none; b=usN+qlR4066RQImwTuOeEblizX2igDEKWc7Hgu5TatJ5y1oiAgSqt40fJb2noqyc6qLNqQ YbJatNCxlreq8UUiQwuRX9S7MaONSXcIpFBy2nv2V+J7HsHeccdog0PUGiYNYwqnqgufZm g5Xl/vTxJ0UvMPc2Lrev7OXb5bLyXkb0izakT01qb30R/FfANA63fnDCVyzN0k4w5UFQ9U 4uZHNik7LIskwKoJHxkuOqBrtPE3bycQub7aFrrmEgS86O6ecuc/bstVaqizPKcXNFuK4+ 5XkknZRXRgaZp+vg3AAoKrTVdQTFsAcJz4lcAo8kt/jATTUkudBkKCuutJXdrQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=InhWJYNm; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1737715911; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OGJqFKW21ns2mcxqMnQ85reSPcyLMSc4S0E5skxOAwc=; b=lQ/x4i70/1kgf82ysPEkUDMpaVshF+jMgAP2PEF5uKz4nWrqxcvgpL17v5DdixWYuQzO74 nzN73Mvwg3OJlZwt4NGRmai5klZ2TPo6+2qBoaubAzVPpEavXtOKxzakvvvYPIBSh2CqVq 3LXdiXEyfsX+ZrqY+UxY+dHcXOyQFC2xxB5P+nhKuXfsT6pWvCPsRGYVi8tdilg0kwi3gz ihinq/asA8VLws+CGN+NbJez+GXbGJ3gx2DEyhzmn392w3YaooDhxc05EZR5HUwh2OnmRc POLg87HgWSTsA8BXZcNfpxPSCNgJCBudj+fQ57L5tGyz/GFLW9nchhFxhWKvZQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 77888837C8 for ; Fri, 24 Jan 2025 11:51:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbHHH-0006oZ-FW; Fri, 24 Jan 2025 05:51:07 -0500 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 1tbHHE-0006nz-Kd for emacs-orgmode@gnu.org; Fri, 24 Jan 2025 05:51:04 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbHHC-0004xO-Vv for emacs-orgmode@gnu.org; Fri, 24 Jan 2025 05:51:04 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4361f664af5so21679815e9.1 for ; Fri, 24 Jan 2025 02:51:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1737715861; x=1738320661; darn=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=OGJqFKW21ns2mcxqMnQ85reSPcyLMSc4S0E5skxOAwc=; b=InhWJYNmTuFa6lHsBHSmY1PWYioAbcrXgK3txvgWtuBMiXdVBJ7jQ9wneXyeFN/WGK d/DB1GoWSg12grknL5bX3mPJFckIYs3EsT/CAcdPxUeM3F4imHldXSvqpCgQxHgTOxU1 jDC5cBsATVbLkUADqVp4ELi2vpZTQHi0usoL9coLgxFtXqL3IAU2Pkgdgtuqgr/MvrdA 3N48V74Wva3yAimwAuhADlhb/6dV8Jpnriy96CE/6tKD9anwcrJnomJaIXerHFneoq3N UaaBd8bxCDPY2YClzhOtXbThy1X9UtLG/yeYYNe8SnHGHkpLm556iTxSeLPGxnpKZSVt AmdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737715861; x=1738320661; 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=OGJqFKW21ns2mcxqMnQ85reSPcyLMSc4S0E5skxOAwc=; b=wHCLLWDVKs2mAennLjUb9TFI7/tohd/dNGwDg1UZZxh63sB0ZqNfXcBI2i/GIfMiRq gxw1t1R8aZQOMM0T+h4dxwGBHtiOkyf4rurmPMGyiEWYieLDy9+K03rQmVQ2qTy+pfmq 9IUG3TCRA6bIhIKAF13B6JiQZz9rjr2CRFqKI6vIZecvrapwlXoLGM9dIAi3rTmoPfhE mXGefIrx/zWPsSvzZ91zmlaGlIU3ew8Kr/mtdfchbh/KQ+qRQ0KBTgRCPfC+7uirnH+V h2nGKPiBaeoO+EqgDceOvgqKaogk/3sGpwoWfl/L00jtXPTe7yyLqfiVQ5uT3Oucp2Ij 6eUA== X-Forwarded-Encrypted: i=1; AJvYcCW6YsE+Dpa4Gw9+iM+ZDi30hvmMg1W0HRqLBgiRYYBwyKCxenJy0hOa/cGhqO/gMlMuFOir3gTPFA7RFYDY@gnu.org X-Gm-Message-State: AOJu0Ywmib6dX8bGsZQKaCAChb1XbXvhkPEqwiA76mSFq0GGCa+DuWec uqa+nZO67EdU1SBdGsE18XJcm+SizZY8T1XwPnOO5uBnNTp4ASSYZCXhig== X-Gm-Gg: ASbGnctro5DAd2wUOm3guymgXVeiZ3EUUaNO42d4oU8k8nPT016eVzA8OpoxF8lSIX5 R2q9t5dj0quMJghpAWJ1OpmutMoC/pZh6wChQtNFkyVfgCTRazUhy7C9lEK3CbZ4OMCWBTheSk+ QFv/yvCFEG64HGQNLbHmVdKTL76r+9FWYl3UW73V8Rfvvf3bB85pZdnwsA/NJ3gpOUf8FG8fdLF FwHzgy0Z5u/Eq4RrjNztbYe7dQxO6BdomtVg7gCsVfO+DEZTiV/jLJVaeHfeUN/Qo3z X-Google-Smtp-Source: AGHT+IHidEASYxeBdp9+FYvcvULxWNhw0eHFt+pf/XGAr3dAvuOwksUYr+su78AL9sb7OqK2xyRFrQ== X-Received: by 2002:a05:600c:1988:b0:434:fddf:5bfa with SMTP id 5b1f17b1804b1-438913bf072mr260298305e9.2.1737715860844; Fri, 24 Jan 2025 02:51:00 -0800 (PST) Received: from rltb ([2a01:e0a:3f3:fb51:357e:3c8a:2625:501d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa599sm22850845e9.7.2025.01.24.02.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jan 2025 02:51:00 -0800 (PST) From: Robert Pluim To: Visuwesh Cc: Ihor Radchenko , =?utf-8?Q?S=C3=A9bastien?= Gendre , org-mode-email Subject: Re: Cannot yank media when image come from Gnome screenshot In-Reply-To: <87jzakpzom.fsf@gmail.com> (Visuwesh's message of "Fri, 24 Jan 2025 10:37:37 +0530") References: <87ed7kttoa.fsf@k-7.ch> <877cdczb94.fsf@localhost> <87ikwws8wa.fsf@k-7.ch> <871q3kz9j9.fsf@localhost> <87v80sf1d6.fsf@localhost> <87y15ghj3u.fsf@gmail.com> <871q34dse3.fsf@localhost> <871q33vvdb.fsf@gmail.com> <87ttfykgok.fsf@localhost> <87wmkuvlkf.fsf@gmail.com> <87cymmkctu.fsf@localhost> <87o701qpmk.fsf@localhost> <87o6zwpzwl.fsf@gmail.com> <87jzakpzom.fsf@gmail.com> Date: Fri, 24 Jan 2025 11:50:59 +0100 Message-ID: <87cygc7aek.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=rpluim@gmail.com; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -8.48 X-Spam-Score: -8.48 X-Migadu-Queue-Id: 77888837C8 X-TUID: davIe0eZq638 >>>>> On Fri, 24 Jan 2025 10:37:37 +0530, Visuwesh sa= id: Visuwesh> * lisp/org-compat.el: Add workaround proposed by Robert Pluim Visuwesh> to make yank-media work under GNOME reliab= ly for Visuwesh> Emacs 29. Did I propose it? I don=CA=BCt remember =F0=9F=98=80 Visuwesh> Link: https://list.orgmode.org/orgmode/87ed7kttoa.fsf@k-7.ch Visuwesh> Reported-by: S=C3=A9bastien Gendre Visuwesh> --- Visuwesh> lisp/org-compat.el | 15 +++++++++++++++ Visuwesh> 1 file changed, 15 insertions(+) Visuwesh> diff --git a/lisp/org-compat.el b/lisp/org-compat.el Visuwesh> index 91192629a..3ad330628 100644 Visuwesh> --- a/lisp/org-compat.el Visuwesh> +++ b/lisp/org-compat.el Visuwesh> @@ -1992,6 +1992,21 @@ (make-obsolete-variable 'org-speed-com= mands-user Visuwesh> "configure `org-speed-commands' inst= ead." "9.5") Visuwesh> (provide 'org-compat) =20 Visuwesh> +;;;; yank-media Visuwesh> +;; Emacs 29's pgtk port has a bug where it might fail to ret= urn the Visuwesh> +;; right TARGET. Install a workaround for Emacs <=3D29 sinc= e the fix Visuwesh> +;; went to Emacs 30. See bug#72254. Visuwesh> +;; Org bug report link: https://list.orgmode.org/orgmode/87e= d7kttoa.fsf@k-7.ch Visuwesh> +;; This should be removed once we drop Emacs 29 support. Visuwesh> +(when (<=3D emacs-major-version 29) I thought Ihor wanted this to check for a pgtk build? Personally I think the check for the window system in the cl-defmethod is enough, but I=CA=BCm not Ihor. One way to check for pgtk is checking the result of (window-system). Or checking whether `pgtk-backend-display-class' is `fboun= dp'. Visuwesh> + (cl-defmethod gui-backend-get-selection ((selection-symbol= (eql 'CLIPBOARD)) Visuwesh> + (target-type (eql= 'TARGETS)) Visuwesh> + &context (window-= system pgtk)) Visuwesh> + (let ((sel (pgtk-get-selection-internal selection-symbol= target-type))) Visuwesh> + (if (vectorp sel) Visuwesh> + sel Visuwesh> + (vector sel))))) Visuwesh> + Visuwesh> ;; Local variables: Visuwesh> ;; generated-autoload-file: "org-loaddefs.el" Visuwesh> ;; End: Visuwesh> --=20 Visuwesh> 2.45.2 Robert --=20