From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65902: 29.0.92; emacsclient-mail.desktop fails due to complicated escaping Date: Thu, 14 Sep 2023 16:36:06 +0300 Message-ID: <83pm2klvw9.fsf@gnu.org> References: <83ttrym8jx.fsf@gnu.org> <83led9nay9.fsf@gnu.org> <66a6c09e-3b61-d913-5638-4c804fb826f6@gmail.com> <83edj1mja5.fsf@gnu.org> <87il8dt3sh.fsf@catern.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13528"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, sbaugh@janestreet.com, 65902@debbugs.gnu.org To: sbaugh@catern.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 14 15:37:08 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 1qgmWq-0003KZ-IS for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Sep 2023 15:37:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgmWh-0000dN-Fo; Thu, 14 Sep 2023 09:36:59 -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 1qgmWf-0000d0-T0 for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 09:36:58 -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 1qgmWe-0004oW-KW for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 09:36:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgmWj-0005un-NW for bug-gnu-emacs@gnu.org; Thu, 14 Sep 2023 09:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Sep 2023 13:37: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.169469861622726 (code B ref 65902); Thu, 14 Sep 2023 13:37:01 +0000 Original-Received: (at 65902) by debbugs.gnu.org; 14 Sep 2023 13:36:56 +0000 Original-Received: from localhost ([127.0.0.1]:37993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgmWe-0005uT-7l for submit@debbugs.gnu.org; Thu, 14 Sep 2023 09:36:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgmWZ-0005uD-Dz for 65902@debbugs.gnu.org; Thu, 14 Sep 2023 09:36:55 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgmWM-0004fY-Kd; Thu, 14 Sep 2023 09:36:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=EGvyrUjSTL0VHyHjQfsOuXbdgAfq6ILkvKI9VD9Iqyo=; b=qCsv8WDMCxEI xGX6riJrQ+2jzdoT5zR1pwzW5ZIQLF7TZ5Npyqn8c7eBWCXZJd0Bb19Dx/3R4ebxdr5rQRlq5zPpr trwb0DbKQXVWutLflnCBaGPTpFgq5lk7zawSor+tkgKsjFjquLwsoRMG/ZnudkCV8rz6tFWAxS5cj 2pK2bRTOjg2zpcLS/VeA7tt1HSmQPCg6sGQ8a/811Ns56c1jMUKynHEqt4kzbAXHxNJ21WsNbJ3/p SSCGlK6/4mVh3At8+pgfPkwNH2pu22mS5uIK//rBJPGR9tAjHccTj0kvO+KSs1E7rX8PYH7FqusBd 4jCc/iOrUo//4QI/LadEVQ==; In-Reply-To: <87il8dt3sh.fsf@catern.com> (sbaugh@catern.com) 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:270425 Archived-At: > From: sbaugh@catern.com > Date: Thu, 14 Sep 2023 11:03:44 +0000 (UTC) > Cc: Jim Porter , 65902@debbugs.gnu.org, > sbaugh@janestreet.com > > The issue is not really with the desktop file. It's a generic problem: No, it isn't. If it were, we'd have heard about it much sooner, and not because of the desktop files. What you are doing is representing a rare problem related to a niche feature is if it were a general one, by inventing use cases to justify that. But if those use cases were important, people would have asked for them long ago. They didn't. Why? because --eval already exists. > > What about alternative solutions: use a shell script in the desktop > > files, and delegate to that script to solve the problem with quoting? > > Had anyone considered this strategy? If not, why not? > > Getting the quoting right is hard and complex, and even Emacs developers > have failed at it over multiple iterations, and when they fail it either > breaks or exposes a security vulnerability. Emacs developers make mistakes even in the simple regexps we have in our code. That doesn't mean we should abandon regexps. The solution for sending Lisp forms to the server exists, and the quoting, although tricky in some cases, is not rocket science to get right. I don't see why we would need another mechanism to do something similar with radically different syntax, a separate set of rules and restrictions that need to be documented, etc. etc. > This solution is far simpler That's an illusion. There's nothing simple about it. You are inventing a new mechanism for passing Lisp forms as something other than Lisp. This has got to have issues into which we will bump sooner or later. E.g., assume that two or more of the arguments to the function begins with single quote, as in $ emacsclient --apply func arg1 'foo arg2 'bar Escape-quoting, here we come again!