emacs-devel
[Top][All Lists]
Advanced

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

emacsclient-mail.desktop and --display


From: Max Nikulin
Subject: emacsclient-mail.desktop and --display
Date: Fri, 17 May 2024 11:24:41 +0700
User-agent: Mozilla Thunderbird

Hi,

I am confused by the commit

683efb8de5a 2023-09-21 21:35:50 -0400 Spencer Baugh: Add 'server-eval-args-left' to server.el

It dropped --display="$DISPLAY" argument from emacsclient-mail.desktop, but not from emacsclient.desktop.

I am running emacs-28 from Debian stable, so it might be a false alarm since I have not tried the development version in action.

My point is that semantics of emacsclient --display=ARG is quite different from standard X11 -display option. See lib-src/emacsclient.c

     inconvenient.  So we force users to use "--display $DISPLAY" if
     they want Emacs to connect to their current display.

Earlier I faced a not so obvious issue with a custom desktop file for org-protocol. I could not figure out why some function like getting X selection did not work. If emacs is started as a daemon then it does not open a connection to X server on startup or in response to emacsclient command without explicit --display="$DISPLAY".

I am less sure concerning WAYLAND_DISPLAY, but looking into the code I expect that it is applied by default (unlike DISPLAY).

Shouldn't --display="$DISPLAY" be added back to emacsclient-mail.desktop (with a comment why it is there)? If I missed some changes and this option is now optional then it should be dropped from emacsclient.desktop as well? Should it be something like --display="${WAYLAND_DISPLAY:-${DISPLAY}}" in both cases to prefer wayland if it is available?

P.S. A lot of thanks to Spencer Baugh for `server-eval-args-left'. It is a great step toward convenient and secure way to invoke emacsclient with arbitrary arguments (though it is a bit less ergonomic than --apply).



reply via email to

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