all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacsclient-mail.desktop and --display
@ 2024-05-17  4:24 Max Nikulin
  0 siblings, 0 replies; only message in thread
From: Max Nikulin @ 2024-05-17  4:24 UTC (permalink / raw)
  To: emacs-devel; +Cc: Spencer Baugh

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).



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-17  4:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17  4:24 emacsclient-mail.desktop and --display Max Nikulin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.