all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Max Nikulin <manikulin@gmail.com>
To: emacs-devel@gnu.org
Cc: Spencer Baugh <sbaugh@catern.com>
Subject: emacsclient-mail.desktop and --display
Date: Fri, 17 May 2024 11:24:41 +0700	[thread overview]
Message-ID: <3a7788de-2667-46be-9f30-da947447f147@gmail.com> (raw)

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	other threads:[~2024-05-17  4:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a7788de-2667-46be-9f30-da947447f147@gmail.com \
    --to=manikulin@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=sbaugh@catern.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.