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: Fri, 15 Sep 2023 09:29:09 +0300 Message-ID: <835y4ckkzu.fsf@gnu.org> References: <80d8aeb0-c9f1-410f-b83d-60f83ca5b3af@email.android.com> <83led8ls3z.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37904"; mail-complaints-to="usenet@ciao.gmane.io" Cc: jporterbugs@gmail.com, sbaugh@catern.com, 65902@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 15 08:30:23 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 1qh2LO-0009h1-Ja for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Sep 2023 08:30:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qh2L0-0000jY-RN; Fri, 15 Sep 2023 02:29: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 1qh2Kz-0000ZB-2D for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 02:29: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 1qh2Ky-0003wa-QD for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 02:29:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qh2L4-0005FP-II for bug-gnu-emacs@gnu.org; Fri, 15 Sep 2023 02:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Sep 2023 06:30:02 +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.169475937420113 (code B ref 65902); Fri, 15 Sep 2023 06:30:02 +0000 Original-Received: (at 65902) by debbugs.gnu.org; 15 Sep 2023 06:29:34 +0000 Original-Received: from localhost ([127.0.0.1]:41865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh2Kc-0005EK-8F for submit@debbugs.gnu.org; Fri, 15 Sep 2023 02:29:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qh2KZ-0005E4-C0 for 65902@debbugs.gnu.org; Fri, 15 Sep 2023 02:29:32 -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 1qh2KN-0003tA-5o; Fri, 15 Sep 2023 02:29:19 -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=qweul88gaDrhRVUwGYDaQeGsPIt+O/KLL1tvTQXL5OE=; b=B+kf4gkoteaR W/CU4mFHO68MCo++yY/bmlwuI6HOtY0h8JIAKsYIHxn1Mj19bU/wXhKTd+RRiENh+6zijEnPuha49 AU54VzKAUGjCvhA1qpA8aLTk+ts7BCso706sJbI8nfXAUPiJCcx9leiYA0/p1fumfLBSEBt8b3HNc EA8d4N/hg5YF5dqC/zhWkK9NSHyZ7Ee02fb4U+w4fUSwf7i3Tdh5ofLVc2wc/ZhkwOo3CN19weIo9 UoLkJ5xbw+MLqP19X4urTfOxpZ5UfU/lvE868zulp0k6c8lEALhjEYP8NH0YiQAC8udO90H8sjtvN 3dROKQnquWedCoBaOlWqeA==; In-Reply-To: (message from Spencer Baugh on Thu, 14 Sep 2023 11:10:44 -0400) 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:270490 Archived-At: > From: Spencer Baugh > Cc: Spencer Baugh , 65902@debbugs.gnu.org, > jporterbugs@gmail.com > Date: Thu, 14 Sep 2023 11:10:44 -0400 > > We could make a command-line-args-left equivalent for emacsclient, > called server-eval-args-left, which contains the FILE arguments passed > to emacsclient as strings. This can be done without making any changes > to emacsclient.c or the server protocol. Then the message-mailto > use case would look like this: > > emacsclient --eval '(message-mailto (pop server-eval-args-left))' %u > > This would match how message-mailto uses (pop command-line-args-left) > internally. > > This would work for all the use-cases I described before; I'd be very > happy with this solution (actually, I'm starting to prefer it to > --apply). And again, it doesn't change emacsclient.c or the server > protocol. This could perhaps be acceptable (although it's still rather kludgey, IMO), but are you sure you understand all the consequences? Currently, when emacsclient is invoked like this: $ emacsclient --eval '(func args)' foo bar we send to the server the following commands: -eval (func args) -eval foo -eval bar IOW, every command-line argument after --eval is treated as being implicitly preceded with --eval. With your proposal, how will the server know that some of "-eval foo" commands should cause foo to be added to server-eval-args-left instead of being evaluated as it does now?