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

From: Peter Oliver <[email-masked]>
Date: Sun, 17 Dec 2023 14:24:27 +0000 (GMT)

Mekeor Melire wrote:

>     $ xdg-open example.txt
>     egrep: warning: egrep is obsolescent; using grep -E
>     [: -c: line 1: unexpected EOF while looking for matching `"'
>     [: -c: line 2: syntax error: unexpected end of file
>     [: -c: line 1: unexpected EOF while looking for matching `"'
>     [: -c: line 2: syntax error: unexpected end of file
>     [: -c: line 1: unexpected EOF while looking for matching `"'
>     [: -c: line 2: syntax error: unexpected end of file
> 
> Does anyone else experience this problem?

I don’t experience it on Fedora, but I notice that the Fedora version of xdg-utils carries an awful lot of patches (https://src.fedoraproject.org/rpms/xdg-utils/tree/f38).

I agree that the quoting is too complex, and would be better eliminated.  A wrapper script could achieve the same functionality.

While I’m here, I’ll mention the other emacsclient.desktop issues that I’m aware of:

- Startup notification doesn’t work when opening files in an existing Emacs: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49504
- $DISPLAY is inappropriate for PGTK on Wayland, since it forces XWayland.
- emacsclient.desktop provides a superset of the functionality of emacs.desktop, but can’t replace it because there isn’t agreement that use of a daemon is suitable default behaviour.

-- 
Peter Oliver