GNU bug report logs - #67736
30.0.50; emacsclient.desktop fails with quoting-related error

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mekeor Melire <mekeor <at> posteo.de>
Cc: 67736 <at> debbugs.gnu.org
Subject: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error
Date: Sun, 10 Dec 2023 08:17:37 +0200
> From: Mekeor Melire <mekeor <at> posteo.de>
> Date: Sun, 10 Dec 2023 00:13:33 +0000
> 
> In GNU+Linux, in Xorg, with xdg-utils installed, and with
> emacsclient.desktop[1] from Emacs repository installed, configure the
> mapping from mime-types to applications by creating a file
> ~/.config/mimeapps.list with contents:
> 
>     [Default Applications]
>     text/plain=emacsclient.desktop
> 
> Create a plain-text file and open it with the XDG default application:
> 
>     echo hello > example.txt
>     xdg-open example.txt
> 
> I expect Emacsclient to start and open the file. Instead, I get the
> following error messages which point to quoting-related problems.
> 
>     $ 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
> 
> Apparently, since the default application Emacsclient exits with
> failure, xdg-open then proceeds by trying out other applications that
> have an installed .desktop-file. Thus another program opens the file.

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.

> It seems like it is a problem introduced with bug#49195 / commit
> cbf220bc31c0a00c45b22c140eda7854d81d991b [2]. All versions of the Exec=
> line of emacsclient.desktop result in the same erroneous behavior for me
> since this commit. I.e. the last version that works is just:
> 
>     Exec=emacsclient -c %F

What is the command that is run with the current emacsclient.desktop
file?




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.