GNU bug report logs -
#67736
30.0.50; emacsclient.desktop fails with quoting-related error
Previous Next
Reported by: Mekeor Melire <mekeor <at> posteo.de>
Date: Sun, 10 Dec 2023 00:57:01 UTC
Severity: normal
Found in version 30.0.50
Done: Mekeor Melire <mekeor <at> posteo.de>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 67736 <at> debbugs.gnu.org (full text, mbox):
2023-12-10 08:17 eliz <at> gnu.org:
> Why does emacsclient exit with a failure in that case? When I try
> invoking emacsclient from the shell prompt, it exits with a zero exit
> status, not with a failure.
Invoking emacsclient from shell prompt directly, works just fine for me
too. Supposedly, it's not emacsclient that exists with failure but the
sh command mentioned below.
> What is the command that is run with the current emacsclient.desktop
> file?
Unfortunately, I don't know which command xdg-open tries to execute
exactly. But the configuration (in Emacs' emacsclient.desktop) is this:
Exec=sh -c "if [ -n \\"\\$*\\" ]; then exec emacsclient
--alternate-editor= --display=\\"\\$DISPLAY\\" \\"\\$@\\"; else exec
emacsclient --alternate-editor= --create-frame; fi" sh %F
https://git.sv.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop?h=cf11fdfd8e460d966ba279f00633ab378038de68#n6
Note that the Exec key of .desktop files has very complicated quoting
rules:
https://specifications.freedesktop.org/desktop-entry-spec/1.1/ar01s06.html
By the way, I found a recent bug report on the Github website of the
Telegram-Desktop repository that mentions the same problem that I'm
experiencing:
https://github.com/telegramdesktop/tdesktop/issues/27100
Actually, I have the feeling that this is a bug in xdg-utils. I will
file a bug report there.
In the mean time, should we work-around this bug by just using this or
something similar?:
Exec=emacsclient --alternate-editor= --create-frame %F
This bug report was last modified 1 year and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.