From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#65902: 29.0.92; emacsclient-mail.desktop fails due to complicated escaping Date: Wed, 13 Sep 2023 16:00:44 -0400 Message-ID: References: <83ttrym8jx.fsf@gnu.org> <83led9nay9.fsf@gnu.org> <66a6c09e-3b61-d913-5638-4c804fb826f6@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27176"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: sbaugh@catern.com, Eli Zaretskii , 65902@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 13 22:01:18 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 1qgW34-0006mg-Cp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 13 Sep 2023 22:01:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgW2k-000245-NW; Wed, 13 Sep 2023 16:00:58 -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 1qgW2j-00023o-RO for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 16:00:57 -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 1qgW2i-0005O7-6Y for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 16:00:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgW2n-0006hO-J6 for bug-gnu-emacs@gnu.org; Wed, 13 Sep 2023 16:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Sep 2023 20:01: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.169463526025736 (code B ref 65902); Wed, 13 Sep 2023 20:01:01 +0000 Original-Received: (at 65902) by debbugs.gnu.org; 13 Sep 2023 20:01:00 +0000 Original-Received: from localhost ([127.0.0.1]:36115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgW2m-0006h2-7W for submit@debbugs.gnu.org; Wed, 13 Sep 2023 16:01:00 -0400 Original-Received: from mxout5.mail.janestreet.com ([64.215.233.18]:38715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgW2h-0006gl-S7 for 65902@debbugs.gnu.org; Wed, 13 Sep 2023 16:00:59 -0400 In-Reply-To: <66a6c09e-3b61-d913-5638-4c804fb826f6@gmail.com> (Jim Porter's message of "Wed, 13 Sep 2023 12:33:01 -0700") 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:270358 Archived-At: Jim Porter writes: > On 9/13/2023 12:13 PM, Eli Zaretskii wrote: >> And I don't understand why we need to add any options to Emacs itself, >> btw. The suggestion to have some "symmetry" here was one of the >> reasons that discussion got nowhere. So let's learn from that >> mistake, at least. > > There's a practical benefit to this. If you have $EDITOR set in your > environment to something like "emacsclient --alternate-editor=emacs", > then it would be nice if you could say this: > > $EDITOR --apply some-func arg1 arg2 > > and have it do the same thing whether or not there was already an > Emacs server running. The symmetry between the two commands (plus > proper argument forwarding) would make that work. This already works out of the box with --alternate-editor='', no need for any argument forwarding, and no need for support for this argument in Emacs itself. It doesn't work with --alternate-editor=emacs, but I think that is OK. I think the alternate-editor='' configuration is far more common, and that works just fine. And we have not before done any special casing for forwarding arguments from emacsclient to alternate-editor=emacs, so I don't think there's any reason to start now. (I personally think that alternate-editor=emacs is somewhat ill-advised, since it doesn't ensure that the server gets started) That being said, supporting --apply in Emacs itself is fine with me, although it's not strictly necessary since in Emacs itself, --apply func -- is basically equivalent to --eval (apply func command-line-args-left) (This doesn't work in emacsclient, and would be very difficult to support, so --apply is necessary for emacsclient) > However, if people can't agree, then we could probably drop that > part. To me, it sounds like people *do* agree that this would be good > to have though. I'm fine either way.