From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mekeor Melire Newsgroups: gmane.emacs.bugs Subject: bug#67736: 30.0.50; emacsclient.desktop fails with quoting-related error Date: Sun, 10 Dec 2023 00:13:33 +0000 Message-ID: <87a5qiswvy.fsf@posteo.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11108"; mail-complaints-to="usenet@ciao.gmane.io" To: 67736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 10 01:57:11 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rC886-0002fq-UC for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Dec 2023 01:57:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rC87m-000548-D0; Sat, 09 Dec 2023 19:56:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rC87k-00053v-EA for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:56:48 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rC87k-0003Tp-4L for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:56:48 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rC87x-0004mB-Tx for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Dec 2023 00:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67736 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170216978018301 (code B ref -1); Sun, 10 Dec 2023 00:57:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Dec 2023 00:56:20 +0000 Original-Received: from localhost ([127.0.0.1]:49195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC87H-0004l7-So for submit@debbugs.gnu.org; Sat, 09 Dec 2023 19:56:20 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:47298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rC87F-0004ko-7x for submit@debbugs.gnu.org; Sat, 09 Dec 2023 19:56:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rC86v-0004zT-UU for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:55:57 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rC86s-0003OW-RK for bug-gnu-emacs@gnu.org; Sat, 09 Dec 2023 19:55:57 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3EBCF240027 for ; Sun, 10 Dec 2023 01:55:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1702169751; bh=sRMFF269rufKXpJYiKpetb6G/4oOkrs/QssEnO8ZUhs=; h=From:To:Subject:Date:Message-ID:MIME-Version:From; b=Tu6SfpYYEN5Jdjfk5gZwmjH9U7XqQTXDfkZ9d0fJjtwDabQkGlc6eiuLtOaqdSEXn BJjEcSzq7k5iMa5QSMTmayc1QVxEguidxVycYtdbJ/5+DtHhogHJoRRztldqh1IhTo w8PV8Np+hTAsMtvy0B+sgkQOMLadjJOPGtWGcHHEGFOQvInNkwUvJxWAj4F5GDbqI8 RO9MXKM0xu5EZbe2izTQWlBKleJdnbqzXkHgj3UxvJy1pD/f4nnY5j0r5jaPzreNVn GSpIbngGk7FWMENSfbOiqMFRClDZni/gLwyivzKFTDfyJZxGeOCPHnA45juYOQVjB/ iYh3vMmYUAXLg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Snmdf58dmz6tm4; Sun, 10 Dec 2023 01:55:50 +0100 (CET) Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275889 Archived-At: 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