Subject: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error

From: Mekeor Melire <[email-masked]>
Date: Sun, 10 Dec 2023 11:28:37 +0000

2023-12-10 11:14 [email-masked]:

> 2023-12-10 08:17 [email-masked]:
> Actually, I have the feeling that this is a bug in xdg-utils. I will
> file a bug report there.

Actually, there are already bug-reports on xdg-utils for this, also
mentioning emacsclient.desktop explicitely:

https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236
https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/174

> In the mean time, should we work-around this bug by just using this or
> something similar?:
>
>     Exec=emacsclient --alternate-editor= --create-frame %F

Should we close this very bug or should we implement a work-around?

E.g we could stop using a complex, nested invokation of sh, and instead
just execute emacsclient with some arguments, without any need for
quoting, as I mentioned.

Altenatively, we could ship an executable.sh which invokes emacsclient
appropriately. [1] But the quoting of Exec= lines in .desktop-files is
just flawed right now.

[1] As suggested here: "The quicker fix will probably be having a script
     somewhere in the filesystem that handles that logic."
     https://gitlab.freedesktop.org/xdg/xdg-utils/-/issues/236#note_2169234