* Help me understand the exec entry in emacsclient.desktop
@ 2023-12-02 1:37 Alexandros Prekates
2023-12-17 0:58 ` Mekeor Melire
0 siblings, 1 reply; 2+ messages in thread
From: Alexandros Prekates @ 2023-12-02 1:37 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
That is the entry:
Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient
--alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec
emacsclient --alternate-editor= --create-frame; fi"
My interpretation so far is: If files where given as arguments then
start in a certain display and use the current opened frame .
If files were not given then create a new frame.
But it doesnt make much sense to me. Also why sh %F and not %F ?
And why in the latter case display is not being set ?
Alexandros.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Help me understand the exec entry in emacsclient.desktop
2023-12-02 1:37 Help me understand the exec entry in emacsclient.desktop Alexandros Prekates
@ 2023-12-17 0:58 ` Mekeor Melire
0 siblings, 0 replies; 2+ messages in thread
From: Mekeor Melire @ 2023-12-17 0:58 UTC (permalink / raw)
To: aprekates; +Cc: help-gnu-emacs
I recently started a discussion on emacsclient.desktop's Exec entry
here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67736
To precisely answer your question, the current Exec line does this:
emacsclient.desktop start emacsclient, and if there's no daemon running,
it'll start one. This is what --alternate-editor= is for. Additionally:
If emacsclient.desktop is applied on one or more files, then it'll try
to reuse one of the frames, if I understand correctly.
Otherwise, i.e. if you're invoking emacsclient.desktop without any files
passed to it, e.g. by clicking its icon in your app-launcher, it'll
create a frame.
For me, personally, the Exec entry does not work but fails with an error
related to quoting. Please share your experience in the mentioned
bug-report.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-12-17 0:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-02 1:37 Help me understand the exec entry in emacsclient.desktop Alexandros Prekates
2023-12-17 0:58 ` Mekeor Melire
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).