From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65902: 29.0.92; emacsclient-mail.desktop fails due to complicated escaping Date: Sat, 16 Sep 2023 18:54:23 +0300 Message-ID: <87pm2ijeq8.fsf@thaodan.de> References: <83ttrym8jx.fsf@gnu.org> <83led9nay9.fsf@gnu.org> <66a6c09e-3b61-d913-5638-4c804fb826f6@gmail.com> <83edj1mja5.fsf@gnu.org> <87ediyp72f.fsf@thaodan.de> <83zg1mgqr9.fsf@gnu.org> Reply-To: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27960"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65902@debbugs.gnu.org, jporterbugs@gmail.com, sbaugh@janestreet.com, sbaugh@catern.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 16 17:55:20 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 1qhXdg-00071n-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 16 Sep 2023 17:55:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhXdL-00024C-OM; Sat, 16 Sep 2023 11:55:00 -0400 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 1qhXdH-00023A-PB for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 11:54:55 -0400 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 1qhXdG-0006nw-FG for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 11:54:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qhXdN-00028V-Hh for bug-gnu-emacs@gnu.org; Sat, 16 Sep 2023 11:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Bj=C3=B6rn?= Bidar Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 16 Sep 2023 15:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65902 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 65902-submit@debbugs.gnu.org id=B65902.16948796778169 (code B ref 65902); Sat, 16 Sep 2023 15:55:01 +0000 Original-Received: (at 65902) by debbugs.gnu.org; 16 Sep 2023 15:54:37 +0000 Original-Received: from localhost ([127.0.0.1]:48347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhXcz-00027h-5Q for submit@debbugs.gnu.org; Sat, 16 Sep 2023 11:54:37 -0400 Original-Received: from thaodan.de ([2a03:4000:4f:f15::1]:37828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qhXcu-00027V-W1 for 65902@debbugs.gnu.org; Sat, 16 Sep 2023 11:54:35 -0400 Original-Received: from odin (dsl-trebng12-50dc77-87.dhcp.inet.fi [80.220.119.87]) by thaodan.de (Postfix) with ESMTPSA id 12427D08DB9; Sat, 16 Sep 2023 18:54:24 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thaodan.de; s=mail; t=1694879664; bh=LH0m+uId9ERa6zUnmHb//Nc5A5YUShlKp3MGd11ycE0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=gdylTTXJbBwE8FHlWYAbS1C/EqWwbd93lg6wX5VdGUcyXykvhz1bkeuh4nUGemOKU aZQYJTWtaQ8q5xHPUswWJkvMcpZgNK7ojYkZ4Q0/IxpyeZbVE+fdj+J/f8mN8t3h7i nG8h2K9IEWhqw8piHRfiG9lXGKaHtzRdKOCHo6vCcyHPY7f8tzZrDUg0vfsajXck/j JniV72D4ZCBv88+uFxIM8AuEON/fTRNiQJ79Y6QLNZ/h+XNfydJP0PfPMF/THCWHW2 b7KHrgoS4jj7U+gZBBufa7ugxrInXhdm019RtETqHNTiAC1oW6EkqChEgmmElZjqtC 08Rvs7hk+6T+ox2EHJs1ATZkeS5sbTVcO/Hai6ycyUsrWlzwIaBZFdFQE5r37ptpE7 s5BVJwWsK+LKnqwfb2MjwyDiVXl18RjsXQxxss9ef8PH8rnv+DPB/refrAsaBRNl4X 6cb21EqWBz9xm2o/vQLwvxXG2onESQD94radI0lNfikt2xPYcedbz+eYQWWm0DGVT1 Rylqlj/an4D/jz5juKR+k5Jkm+ppmv4CEuWL6gn397yhPKyAOX9bYq8f7eXRmPKD2D /9gE69MbQpbM/lkQEPb60NHPFF0gnCwX2FhB1N2KrN2UlzqHVt6TmMKPcyo5HRcQl0 fSAOzEhv9iyUKNOyLujsbd5A= In-Reply-To: <83zg1mgqr9.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Sep 2023 17:02:50 +0300") Autocrypt: addr=bjorn.bidar@thaodan.de; prefer-encrypt=nopreference; keydata= mDMEZNfpPhYJKwYBBAHaRw8BAQdACBEmr+0xwIIHZfIDlZmm7sa+lHHSb0g9FZrN6qE6ru60JUJq w7ZybiBCaWRhciA8Ympvcm4uYmlkYXJAdGhhb2Rhbi5kZT6IlgQTFgoAPgIbAwULCQgHAgIiAgYV CgkICwIEFgIDAQIeBwIXgBYhBFHxdut1RzAepymoq1wbdKFlHF9oBQJk1/YmAhkBAAoJEFwbdKFl HF9oB9cBAJoIIGQKXm4cpap+Flxc/EGnYl0123lcEyzuduqvlDT0AQC3OlFKm/OiqJ8IMTrzJRZ8 phFssTkSrrFXnM2jm5PYDoiTBBMWCgA7FiEEUfF263VHMB6nKairXBt0oWUcX2gFAmTX6T4CGwMF CwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQXBt0oWUcX2hbCQEAtru7kvM8hi8zo6z9ux2h K+B5xViKuo7Z8K3IXuK5ugwA+wUfKzomzdBPhfxDsqLcEziGRxoyx0Q3ld9aermBUccHtBxCasO2 cm4gQmlkYXIgPG1lQHRoYW9kYW4uZGU+iJMEExYKADsCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwEC HgcCF4AWIQRR8XbrdUcwHqcpqKtcG3ShZRxfaAUCZNf2FQAKCRBcG3ShZRxfaCzSAP4hZ7cSp0YN XYpcjHdsySh2MuBhhoPeLGXs+2kSiqBiOwD/TP8AgPEg/R+SI9GI9on7fBJJ0mp2IT8kZ2rhDOjg gA6IkwQTFgoAOxYhBFHxdut1RzAepymoq1wbdKFlH 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:270630 Archived-At: Eli Zaretskii writes: >> From: Bj=C3=B6rn Bidar >> Cc: Jim Porter , 65902@debbugs.gnu.org, >> sbaugh@janestreet.com, sbaugh@catern.com >> Date: Sat, 16 Sep 2023 16:43:20 +0300 >>=20 >> Eli Zaretskii writes: >>=20 >> > People might agree, but I don't. Please consider the perspective. >> > This started as an obscure and rare problem in a desktop file (which >> > we provided solely out of good will, since it really isn't our job to >> > do so, it's the job of downstream distros). >>=20 >> Programs ship their own desktop files. > > Programs are shipped by distros. Emacs as a project does not ship > anything, we just release the sources in a form that makes building > Emacs easy. Our source tarballs cannot be installed, so they are not > a finished, ready-to-use product. Distros, by contrast, do ship > programs ready to be used. > Ship source or programs the difference is in semantics. >> It is not the job of the downstream to provide desktop files unless >> it is because of a patch from said downstream. >>=20 >> In any case it doesn't make sense for each downstream to ship their own >> desktop file and fix their own. > > I disagree. Desktop files are specific to the target OS, but Emacs as > the project does not target any specific OS (although there are OSes > that we treat more favorably when considering features). The know-how > about what exactly is needed for the desktop integration is also > something that the distros have and we don't, except by chance. Emacs contains many files specific to operating system or shared by operating systems (in the case of desktop files mostly about different Linux distributions that share 90% of their specific attributes). But again it's about semantics, if it really was about not having any operating specific parts in Emacs than why is there Windows or macOS specific functions in Emacs. > Each distro targets a single OS, and so it is reasonable to expect > them to arrange for the necessary desktop integration. For example, > no one would expect us to provide desktop shortcuts for MS-Windows, > except as a sign of good will and when we have the necessary expertise > on board. Emacs has operating specific code, for Windows or macOS even in low level interfaces and not just lisp code or accessories such as desktop shor= tcuts. Each distribution complies with XDG, all desktop file are XDG compliant. Emacs has desktop files that work with all distributions be it Linux or BSD. >> >From my pov letting Emacs do all work in passing arguments is the best >> solution as escaping is error prone. I haven't seen any program besides >> Emacs using escaped shell syntax to pass the escaped syntax of their >> target language. Most just have options to pass the target file or deal >> with the dbus activation/interface. > > We don't require any escapes except those needed by Lisp. > > Note that in this case, at least some of the escapes are because the > desktop shortcut invokes emacsclient via "sh -c "COMMAND STRING", > something that should be considered an Emacs problem or a problem we > must solve. I agree. In the desktop files it is assumed that X11 is used (check for DISPLAY variable to be set) which breaks (native) Wayland usage, but that is another issue.