[வெள்ளி ஜனவரி 24, 2025] Robert Pluim wrote:

>>>>>> On Fri, 24 Jan 2025 10:37:37 +0530, Visuwesh <visuwe...@gmail.com> said:
>
>     Visuwesh> * lisp/org-compat.el: Add workaround proposed by Robert Pluim
>     Visuwesh> <rpl...@gmail.com> to make yank-media work under GNOME reliably 
> for
>     Visuwesh> Emacs 29.
>
> Did I propose it? I donʼt remember 😀

You did, indeed.  See https://yhetil.org/87wmlb8djy....@gmail.com.

>     Visuwesh> Link: https://list.orgmode.org/orgmode/87ed7kttoa....@k-7.ch
>     Visuwesh> Reported-by: Sébastien Gendre <s...@k-7.ch>
>     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-commands-user
>     Visuwesh>                          "configure `org-speed-commands' 
> instead." "9.5")
>     Visuwesh>  (provide 'org-compat)
>
>     Visuwesh> +;;;; yank-media
>     Visuwesh> +;; Emacs 29's pgtk port has a bug where it might fail to 
> return the
>     Visuwesh> +;; right TARGET.  Install a workaround for Emacs <=29 since 
> the fix
>     Visuwesh> +;; went to Emacs 30.  See bug#72254.
>     Visuwesh> +;; Org bug report link: 
> https://list.orgmode.org/orgmode/87ed7kttoa....@k-7.ch
>     Visuwesh> +;; This should be removed once we drop Emacs 29 support.
>     Visuwesh> +(when (<= 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ʼm not Ihor.

I think so too but let's hear from Ihor first.

> One way to check for pgtk is checking the result of
> (window-system). Or checking whether `pgtk-backend-display-class' is
> `fboundp'.

I don't think we should use (window-system) since the return value is
FRAME dependent: if Someone™ opens a terminal frame first and loads Org
while it is focused, they won't get this fix even if their build is a
pgtk build.  C:
[ I think this will definitely break for daemon processes.  ]

We could rely on (fboundp 'pgtk-backend-display-class) but I somehow
don't like it as compared to just leaving this extra check out.

Reply via email to