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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#67736: 30.0.50; emacsclient.desktop fails with quoting-related error
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 67736 <at> debbugs.gnu.org.
--
67736: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67736
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
2023-12-18 11:17 ulm <at> gentoo.org:
> > Honestly, I don't know how to handle this tricky situation:
> > freedesktop.org has specification for Exec entries in .desktop-files.
> > xdg-utils itself does implement this specification correctly.
>
> Is a "not" missing there? Otherwise I don't understand the sentence.
You are right, a "not" was missing.
> Standards exist for a reason, namely that developers can program
> against them, instead of second-guessing other implementations.
>
> I think we have established that the bug is in xdg-utils, so that's
> where it should be ultimately fixed. Not sure if it's worth having a
> short-term workaround using a wrapper script.
You are right. Let's close this bug. It's an upstream-bug.
[Message part 3 (message/rfc822, inline)]
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.
Does anyone else experience this problem?
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
Please let me know if you can or cannot reproduce this, because it might
also possibly be a bug in my OS distribution, GNU Guix System.
By the way, I'm using the latest version of xdg-utils, 1.1.3, probably
released on 2018-05-10.
In GNU Emacs 30.0.50 (build 1, x86_64-unknown-linux-gnu, Motif Version
2.3.8, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Guix System
Configured using:
'configure
CONFIG_SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash
SHELL=/gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16/bin/bash
--prefix=/gnu/store/whmdrrv8db90a238jgjy24hd13diljfl-emacs-next-motif-30.0.50-1.9d27b95
--enable-fast-install --build=x86_64-unknown-linux-gnu
--with-x-toolkit=motif --with-modules --with-native-compilation=aot
--disable-build-details'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11 XDBE XIM XPM MOTIF ZLIB
[1] https://git.savannah.gnu.org/cgit/emacs.git/tree/etc/emacsclient.desktop
[2] https://git.savannah.gnu.org/cgit/emacs.git/commit/etc/emacsclient.desktop?id=cbf220bc31c0a00c45b22c140eda7854d81d991b
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.