emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-x11idle-exists-p with emacs --daemon


From: Ihor Radchenko
Subject: Re: org-x11idle-exists-p with emacs --daemon
Date: Sat, 29 Oct 2022 02:54:52 +0000

Julien Cubizolles <j.cubizolles@free.fr> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Does the attached patch work for you?
>
> Yes it does, thanks.

Thanks for testing!
Applied onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a51bb2c448bab7665667471aa227e3e25dbbdced

> Also, org-user-idle-seconds uses (eq window-system 'x) which according
> to its docstring should be replaced by (display-graphic-p).

I do not think so.
org-user-idle-seconds is not about graphics, but about the window
system being used. Now, we have special handling for Mac and X11 and
fall back to universally working, though not accurate,
`org-emacs-idle-seconds'.

> I've tested
> the change and it's working, with the added advantage that it works
> both in a X11 and in a wayland session (provided your
> org-clock-x11idle-program-name works in both, mine does).

Is there a way to detect wayland build? Does window-system have any
special value on the gtk build? If yes, we can introduce
wayland-specific variable.

> There is another use of window-sytem in the org-mode source, namely in
> org-get-x-clipboard in org-compat.el, but I don't know if it's safe to
> make the switch there.

AFAIR, clipboard in Wayland is not the same as in X and might have bugs
https://orgmode.org/list/1902025.jDVfpnRRgo@pluto

I am not sure if `gui-get-selection' is going to work on Wayland. The
docstring says:

     Return the value of an X Windows selection.

Wayland is not X Windows...

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]