From unknown Wed Jun 18 23:16:12 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54487 <54487@debbugs.gnu.org> To: bug#54487 <54487@debbugs.gnu.org> Subject: Status: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp Reply-To: bug#54487 <54487@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:16:12 +0000 retitle 54487 29.0.50; connection-local value for `shell-file-name' not set= in Dired buffers over Tramp reassign 54487 emacs submitter 54487 Jim Porter severity 54487 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 00:59:02 2022 Received: (at submit) by debbugs.gnu.org; 21 Mar 2022 04:59:02 +0000 Received: from localhost ([127.0.0.1]:35567 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWA8D-00027C-VA for submit@debbugs.gnu.org; Mon, 21 Mar 2022 00:59:02 -0400 Received: from lists.gnu.org ([209.51.188.17]:54882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWA8C-00026z-8L for submit@debbugs.gnu.org; Mon, 21 Mar 2022 00:59:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWA8B-0000Jw-UT for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2022 00:58:59 -0400 Received: from [2607:f8b0:4864:20::62e] (port=44646 helo=mail-pl1-x62e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nWA8A-0002kx-Bx for bug-gnu-emacs@gnu.org; Mon, 21 Mar 2022 00:58:59 -0400 Received: by mail-pl1-x62e.google.com with SMTP id q11so11697257pln.11 for ; Sun, 20 Mar 2022 21:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:message-id:date:mime-version:content-language :content-transfer-encoding; bh=kcpJ99hjoPagti415e4imaR9i0TDoKZK5sSLwrdsQaQ=; b=Z5x071+T7UQEZgxB1vGIrg2IHrg4NtaDN5picPTNugrw+6yBY/3EjrFq6dafuhZohI CNOgMfvx56tc/ByZNGoQ96OFXxzVGuhbbyURrJXIZ0VWifze0RgJ8fKLcCQUeikneFup HZJ7jy4PeF81r/JwgGYSZwB85ttX/4y4RXJJRODevydyNNSJD+jMVHm3/sDzqg5TbeeR 95OH0yV3HXoVsAvslRVsGq8e4Drq51oxs0KFwzVKYjKBcMzxqBstv2E+bWJ7d+dWSVR9 zKAW9Vxbi/AfdP7hduKQLXg8auGjLSVCnHZS+iQMoAEL5rJauxNP9bYCNVVA5aE2iZE/ qzKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:message-id:date:mime-version :content-language:content-transfer-encoding; bh=kcpJ99hjoPagti415e4imaR9i0TDoKZK5sSLwrdsQaQ=; b=Bz2f3eUoSsfhOQhgE9DIBgz9Ri++2uc/DfBQ82hY9q2ZWY+LFmrjX/xxpl8OhYSqs8 J1Ti/iDTaSab5dDnRPmRBh0RScHiR9HybdNxNBOnKqT8fV2RNTa5UmoapR0LNQvG6Xr8 ViA8gldW43e6wrbax+DNhegqADK04hfjZb75VUhHB7jDt8NczVAJirW1W7/lmJUtW3yN pwd1NDfYPRx3Xj8FxElAlCufVZRL/V6qm58Ovw16jOf6xInYM+U9V0PTUJxpQSVEzxlJ nLlsb3mrfaJhPPcyeHyXfGVxymCSVkl4ZXn5JKv1z6uaa0tfLmI/R6PUd4D6SsrLZjQ4 753w== X-Gm-Message-State: AOAM531faZZ2po0DE6ZUV/kOZ02qY2cmCFSo7j4vk6Rzf5FwMxIz74fK Erm+hNHINsh1r4ivTZOPNFEpaub7/Hw= X-Google-Smtp-Source: ABdhPJxvXJ+ISgJetTAbRiUKnzKy5vC7fHm5E/5ocVTAsJ5U80QM5X+dR0r9r21VLZ2tt1zaAF326w== X-Received: by 2002:a17:902:ce05:b0:14f:8ba2:2339 with SMTP id k5-20020a170902ce0500b0014f8ba22339mr11501705plg.152.1647838736808; Sun, 20 Mar 2022 21:58:56 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id lk7-20020a17090b33c700b001c686a5fc9bsm11113092pjb.33.2022.03.20.21.58.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 20 Mar 2022 21:58:56 -0700 (PDT) X-Mozilla-News-Host: news://news.gmane.org:119 From: Jim Porter Subject: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp To: bug-gnu-emacs@gnu.org Message-ID: Date: Sun, 20 Mar 2022 21:58:56 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::62e (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::62e; envelope-from=jporterbugs@gmail.com; helo=mail-pl1-x62e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hopefully I've summarized the issue correctly in the bug title. To see this in action, run the following from `emacs -Q' on an MS-Windows system ("host" in this example is a remote GNU/Linux system): C-x C-f /ssh:host:~ M-x rgrep RET some text RET RET RET The rgrep output will look something like: find [...] --null -e "some text" "{}" + find: paths must precede expression: `^^!^' You can click the "[...]" to see the full invocation. However, even without doing that, if you look carefully, you'll notice that the shell-quoting uses the MS-Windows rules, not that of /bin/sh. For the MS-Windows shell, spaces are quoted by wrapping the entire argument in double-quotes ("like this"); for /bin/sh, spaces are escaped via a backslash (like\ this). Presumably, that's because if you eval `shell-file-name' in the Dired buffer, it reports ".../path/to/cmdproxy.exe". When in a remote *file*, `shell-file-name' is correctly set to "/bin/sh". This also comes up in other (non-Dired) situations. For example: C-x C-f /ssh:host:~/some-file.txt M-x rgrep RET some text RET RET RET ;; everything looks ok ;; now, from the rgrep buffer... M-x rgrep some text RET RET RET ;; same error as in the original case above From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 06:25:40 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 10:25:40 +0000 Received: from localhost ([127.0.0.1]:35945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWFEJ-0002K0-IX for submit@debbugs.gnu.org; Mon, 21 Mar 2022 06:25:40 -0400 Received: from mout.gmx.net ([212.227.15.19]:47959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWFEG-0002Jl-TC for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 06:25:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647858330; bh=yWAREDN3gJDQf55xiKgLseIha/pQtndFLBDAb2rCTJI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=UHtkk7g22ldlPUyj2vh3PhjZ4FwggxITXgg73mUDqWvlC6CuAWNyqHLdDFZHiPwHc nwbl977CmRi+D/XWXzOg0rkg8xQFpeWFlxqyWPQbqw6AtZysLuMhl1+BfP5uHJXtkk dhqg2+10Zh+psih5dbo5J98Lyi38CLGMiGwc/xuA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.118.124]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKuA-1ncopG0GHA-00Scn3; Mon, 21 Mar 2022 11:25:30 +0100 From: Michael Albinus To: Jim Porter Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: Date: Mon, 21 Mar 2022 11:25:28 +0100 In-Reply-To: (Jim Porter's message of "Sun, 20 Mar 2022 21:58:56 -0700") Message-ID: <87y213bo13.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:BQO/pW4Gonnq+Lo2ZFvpLWaYgCUBI0XP0pTmT+cfysKKQfn6Kdb vH+2Sxl1BTWBd55nV+53OAJ8CMLUv/03cdfI3/ozgzsFvQ1sI3f3OA57ohVFhNTjniaIl6l Zf3TduZ2KisxSmiJIxZ3h735jPnppLwMUk6WVf2EMgCj3BQzGG9vjiBPmBRWZ7srdJnzJA+ FqneGMmaogAvqm7THf3nQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:qXZyECPX+1Y=:3lgFr2dzFA6GLNannqYbx+ 6SwafHIef+z/7q/m1p/IANu/WAh9+i5Oypr1hIaRTE6svTI7ejFbaxuzb9esarNChgCdodXa6 +2qYy9yk32WQoB9e93WnqbFStR7nhDvb4uVlHieK0IzZT2dVr98xErBFwKJCSmPvPmSpngKo0 1P1fD0ZfjrHL/Oe3/GGsiIs2X97U2qYP977e/pJxrmk/uXbiPlo2NlrmLfJET5XQpvmHfERCr ewMFm+SJvdjTs4msEGwzrrZbM+pdcU1fs0EwXXKTugnId1C/CPbabqKmuD59sLZzhgCK8HnCY 6QpPQKTlpHAb702Up9aNldaG82Ax0/C8xBY9SnDFbjaeuL1Mr74bP4pE7JZgxudM7J/PJxlew UYPWKJ+VppyEB8VEtDYcVMBC8jXnh80IetqReP7v6aAb8N49CWvAxIi9eFOvK73RZW1XwgYBQ 2yiraXpbiAWw9dzYApdT0p/F5Po+Cayx4HbJFeV3QJTFBdYmKOReVjY3gSUXhCiaGB7pcL7oM IVtUOQ5Nz/b6PP7s/tgmz6zkXL6r034018vMPV3PLAqHle+uIPLi2Dg9M0DvqWiVHR55vyHLa rHYhl4SIDS4filWKL0qOfwq3puH20J3LbNKQSf89q4rDi2jNwe006mw4memg4+svU9M/BVQVE piXbbPMPLXL+FEYX4ju5x7hzGsYK2qv5AwagjaA70V7ihwmwGP5dclRFlaOtqu3SREOwolEBP 7UpKnk8gRwBPy3CJ8GuGI0lcGL8oypq3vHTtFT1KU5k+jCQOC343yYYu5pxj/G2vmz87+kMFQ 1SK0t4xqAlElU9KyCbetgos4BozfRrKlhNuoNpd1SFB7btq2NOwnsv6GvZVdpuEXMZj+kchV8 MUwDURQOhwNiYgeOfVG1GVlIvtzzmfaF0B0YNMom3iBi0zMCWK4ViVoaBUrygotbS/z7ZiCD/ 2RRo6wKzyKQiFiVPjFNrgX9EcxUtBWO77dGacZThTDdyN+S7GdyMBgCw8wgxO1T47aqs60fIM qM/B+3E2QOHKTUEHzAJ2FrOSG2BFrpNN0dokBAg6aqdDZw1l7bLenp+uiH7KRE30iIYxxVCPU Z/+w/qL1zMg0ss= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-=-= Content-Type: text/plain Jim Porter writes: Hi Jim, > Hopefully I've summarized the issue correctly in the bug title. To see > this in action, run the following from `emacs -Q' on an MS-Windows > system ("host" in this example is a remote GNU/Linux system): > > C-x C-f /ssh:host:~ > M-x rgrep RET > some text RET RET RET > > The rgrep output will look something like: > > find [...] --null -e "some text" "{}" + > find: paths must precede expression: `^^!^' I confirm the bug, it happens also for me. > You can click the "[...]" to see the full invocation. However, even > without doing that, if you look carefully, you'll notice that the > shell-quoting uses the MS-Windows rules, not that of /bin/sh. For the > MS-Windows shell, spaces are quoted by wrapping the entire argument in > double-quotes ("like this"); for /bin/sh, spaces are escaped via a > backslash (like\ this). > > Presumably, that's because if you eval `shell-file-name' in the Dired > buffer, it reports ".../path/to/cmdproxy.exe". When in a remote > *file*, `shell-file-name' is correctly set to "/bin/sh". It is not a problem of shell-file-name, if you check the Tramp debug buffer you'll see, that a proper shell ("/bin/sh" in my case) is applied. The problem is rather quoting the arguments with shell-quote-argument. It applies the quoting according to the value of system-type. If this is 'ms-dos or 'windows-nt, MS Windows quoting rules are applied. The appended patch fixes this for me, could you pls check? Best regards, Michael. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index ccc58e6773..85e872bfc2 100644 =2D-- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -611,6 +611,11 @@ grep-hello-file (write-region "Copyright\n" nil result)) result)) +(defun grep-shell-quote-argument (argument) + (let ((system-type + (if (file-remote-p default-directory) 'not-windows system-type))= ) + (shell-quote-argument argument))) + ;;;###autoload (defun grep-compute-defaults () "Compute the defaults for the `grep' command. @@ -636,8 +641,8 @@ grep-compute-defaults (intern (or (file-remote-p default-directory) "localhost"))) (host-defaults (assq host-id grep-host-defaults-alist)) (defaults (assq nil grep-host-defaults-alist)) - (quot-braces (shell-quote-argument "{}")) - (quot-scolon (shell-quote-argument ";"))) + (quot-braces (grep-shell-quote-argument "{}")) + (quot-scolon (grep-shell-quote-argument ";"))) ;; There are different defaults on different hosts. They must be ;; computed for every host once. (dolist (setting '(grep-command grep-template @@ -820,7 +825,7 @@ grep-tag-default (defun grep-default-command () "Compute the default grep command for \\[universal-argument] \\[grep] t= o offer." - (let ((tag-default (shell-quote-argument (grep-tag-default))) + (let ((tag-default (grep-shell-quote-argument (grep-tag-default))) ;; This a regexp to match single shell arguments. ;; Could someone please add comments explaining it? (sh-arg-re @@ -963,7 +968,7 @@ grep-expand-keywords ("" . files) ("" . (null-device)) ("" . excl) - ("" . (shell-quote-argument (or regexp "")))) + ("" . (grep-shell-quote-argument (or regexp "")))) "List of substitutions performed by `grep-expand-template'. If car of an element matches, the cdr is evalled in order to get the substitution string. @@ -1134,10 +1139,10 @@ lgrep (mapconcat (lambda (ignore) (cond ((stringp ignore) - (shell-quote-argument ignor= e)) + (grep-shell-quote-argument = ignore)) ((consp ignore) (and (funcall (car ignore) = dir) - (shell-quote-argument + (grep-shell-quote-argu= ment (cdr ignore)))))) grep-find-ignored-files " --exclude=3D"))) @@ -1245,44 +1250,44 @@ rgrep-default-command (grep-expand-template grep-find-template regexp - (concat (shell-quote-argument "(") + (concat (grep-shell-quote-argument "(") " " find-name-arg " " (mapconcat - #'shell-quote-argument + #'grep-shell-quote-argument (split-string files) (concat " -o " find-name-arg " ")) " " - (shell-quote-argument ")")) + (grep-shell-quote-argument ")")) dir (concat (and grep-find-ignored-directories (concat "-type d " - (shell-quote-argument "(") - ;; we should use shell-quote-argument here + (grep-shell-quote-argument "(") + ;; we should use grep-shell-quote-argument here " -path " - (mapconcat (lambda (d) (shell-quote-argument (concat "*/= " d))) + (mapconcat (lambda (d) (grep-shell-quote-argument (conca= t "*/" d))) (rgrep-find-ignored-directories dir) " -o -path ") " " - (shell-quote-argument ")") + (grep-shell-quote-argument ")") " -prune -o ")) (and grep-find-ignored-files - (concat (shell-quote-argument "!") " -type d " - (shell-quote-argument "(") - ;; we should use shell-quote-argument here + (concat (grep-shell-quote-argument "!") " -type d " + (grep-shell-quote-argument "(") + ;; we should use grep-shell-quote-argument here " -name " (mapconcat (lambda (ignore) (cond ((stringp ignore) - (shell-quote-argument ignore)) + (grep-shell-quote-argument ignore)) ((consp ignore) (and (funcall (car ignore) dir) - (shell-quote-argument + (grep-shell-quote-argument (cdr ignore)))))) grep-find-ignored-files " -o -name ") " " - (shell-quote-argument ")") + (grep-shell-quote-argument ")") " -prune -o "))))) (defun grep-find-toggle-abbreviation () --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 08:41:03 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 12:41:03 +0000 Received: from localhost ([127.0.0.1]:36100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWHLL-0007x4-Gb for submit@debbugs.gnu.org; Mon, 21 Mar 2022 08:41:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWHLK-0007wT-Jc for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 08:41:03 -0400 Received: from [2001:470:142:3::e] (port=41408 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWHLE-0006hi-Er; Mon, 21 Mar 2022 08:40:56 -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=F7EORUxJI2TF7F6pQBWph6tDEaXMV5+xWYBhMpK4O2o=; b=ou1247yuYsI8 3NWm0zOQweTuVXMxbC6YPPuPqRfh40DZrNKricrXZ54TEXhLwYGLiyGPBujU/XGg8hl2AuZDY9MeS pbX2+2MMb6GQh8ohNDXkxgAMjKcM07vTzR9lceMfLJpwgKvoapKnjK0BCrulu6BvFu+aLOy0rMt51 1JiAOEFCabcWaNOoayhPDG/UrHSSSpTSZRB2x5vOB2nCVzNxk95E/cWZI3QdKMCKwqDRh8VEwbwR6 ZxiZwZoRZlFPhxhUhEW9bewk6DS6Bw5UXaV75ytmClRxB/RKVmNxolqY37jOdg+JEdzTL27AbFGdk jcioy7c+AL+ENm1r6KY+Gg==; Received: from [87.69.77.57] (port=4592 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWHLD-0004Hz-U1; Mon, 21 Mar 2022 08:40:56 -0400 Date: Mon, 21 Mar 2022 14:40:39 +0200 Message-Id: <83wngneawo.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <87y213bo13.fsf@gmx.de> (message from Michael Albinus on Mon, 21 Mar 2022 11:25:28 +0100) Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Date: Mon, 21 Mar 2022 11:25:28 +0100 > Cc: 54487@debbugs.gnu.org > > The problem is rather quoting the arguments with shell-quote-argument. It > applies the quoting according to the value of system-type. If this is > 'ms-dos or 'windows-nt, MS Windows quoting rules are applied. > > The appended patch fixes this for me, could you pls check? Is it really a good idea to solve this only for Grep? Shouldn't shell quoting always use this logic (with some variable that callers could bind in exceptional cases, which I presume will be rare)? Or am I missing something? From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 10:06:40 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 14:06:40 +0000 Received: from localhost ([127.0.0.1]:37725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWIgC-0004Fx-8H for submit@debbugs.gnu.org; Mon, 21 Mar 2022 10:06:40 -0400 Received: from mout.gmx.net ([212.227.15.15]:50799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWIgA-0004Fj-CJ for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 10:06:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647871591; bh=+Kp6LSr2QksTe862L0pez+bXMeJN4N6I0S3zZKHpkco=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=XcciRACJ+KdeK9+7n4ExH+vTmYJPdxjsIa5srcBoNUOv/uHm+kulBGQWefdNtZuaG r2ADEu4WhtIHrmfdlR83md1esSHskgcv/I7HqsxH2UY+tWpxRPjGLGzOrHmBn6b6Sw CaZ/hWfgFarApSuqhmgR0LM0mI0UpcAGhx+4OZOI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.118.124]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MjS9I-1nux6y40BW-00kwNb; Mon, 21 Mar 2022 15:06:31 +0100 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> Date: Mon, 21 Mar 2022 15:06:28 +0100 In-Reply-To: <83wngneawo.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Mar 2022 14:40:39 +0200") Message-ID: <87v8w7pfh7.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:RCaMSbXlLMuoAPiyPYEg08x07k23QS2erHgmvvhMrFh33HZa0yC 2jB+Hf6S6DEdgRPYs9mGj1t/PQmjI3xHfDEDush0srng1YuIuP8X1rWm1ubu3K7A16kncx1 SKOVkUTjg9DG7GX9XAB3RaasX1kPkuxxuaiXIzcasJZvJNUXa9b2z7laZdA/b0wrSqTb+7+ jVuF+XYorRDvrqT5/AZAQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9k3Nym4aVhQ=:dpyzgiUO6XIkJXWZZtPnvy pUPrCrWoUn+sG2+oKWDy/I0aj1GPvCif0EMvGmjiHywp3jbsgiY6bObnoGtJpUiXD71a6vxN3 asClovUtwSQ1epgmZaOMVrKWKDF9gXQoT1FK7KQo5AjgzR5fTXi5uiqAambSyJcg0y7+pFfdi JaeuzvDHwP45e+mDhqMDB9nwzSogeXfM+wVtRCBWqutP9qqwHFcfn9JlLjejZmsF6wi9yjA+y xfSHOC1a5zYeV4T2oqalOiDQLW1bZUzaOaEmoVHlaN4Kw+dLAnqVcZjD5uRx9qX8SU2AjtVdo 07Z79YAnygG8dA/iIiod8bphMg1DlovMVWYRDebmcVloFUHlolYZ6WsXny3dq5FjtIZDJ/RRF UKKkJPBJoTZtixROs8Js41yLvnCLEba58tdsIEhF8OWAwBrqn49/Fd+CixbEa5u7AMkyKNj8R FBFctEKGowV5yZg9UpTT+DNfcvud9CevUiMwZatEQ8c5Z56V/HPVmlLYP3s7cxbxmXzdu0IB/ Hq1i8wfQxRpiFGVgoplWU99n0qVdhTYDYfner4fZoDof6vQ1TZVDQ18waCGn5cmRfzKePZ+Hu POarWhC79P9wwcq1vs6qTtnreYDwgChWIvoMYKxW7XbRFQR6IWqjLMSHN9jiVPEg/1WzHLAdQ 3Awb3lUww8cV2i3uA5hPIcF9ZFeHM3xBEsbWizu4yNkyLaYN6cm+o2zR888I8Xpjod4DOCwGg glgetytBRSsyzIol76YLvc9dPckP8Je80L5GqHCc0mf0wzCNa62D4fb1wHsgSq4Uhs3QRe7+Y Id5/tYsLXcpfxJ7+wKQtzYVcRhqlkqJu8RUMfgMHKd9NQYbgJEMpJ6Sql3kIRvZ5juUW2OT2W xgUxAMNX5RLhDH+ib3FboGa1AuyFUw1/S0ZH+MW9PdrAU6+pPVXpePMqP643J0LG2nKL0do4O SEYOn0icR6CRWFRtXIkxH4XOfyioye5A8BIaFKrCa+nLEaw7sjRn8gGNt1dMaVxFlhCkkw1Jw y80IOkU0tkwoWmGPYNEqJswbkvng34NEyXmMMNySdfmWmzxeN6T3fOC0MSQQzj1dkYIzOyKDh iK24sWdBAn9L7U= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: Hi Eli, > Is it really a good idea to solve this only for Grep? Shouldn't shell > quoting always use this logic (with some variable that callers could > bind in exceptional cases, which I presume will be rare)? Or am I > missing something? I had the same feeling after sending the patch, so I've started to rework this. I came out with the following solution: --8<---------------cut here---------------start------------->8--- shell-quote-argument is a compiled Lisp function in =E2=80=98../../../src/emacs/lisp/subr.el=E2=80=99. (shell-quote-argument ARGUMENT &optional POSIX) Quote ARGUMENT for passing as argument to an inferior shell. This function is designed to work with the syntax of your system=E2=80=99s standard shell, and might produce incorrect results with unusual shells. See Info node =E2=80=98(elisp)Security Considerations=E2=80=99. If the optional POSIX argument is non-nil, ARGUMENT is quoted according to POSIX rules. --8<---------------cut here---------------end--------------->8--- I'll wait until Jim confirms that this works in general, then I would apply a patch along this spec. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 10:52:43 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 14:52:43 +0000 Received: from localhost ([127.0.0.1]:37795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJOk-0005cF-Pi for submit@debbugs.gnu.org; Mon, 21 Mar 2022 10:52:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJOj-0005c3-TP for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 10:52:42 -0400 Received: from [2001:470:142:3::e] (port=43484 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWJOe-00052V-KT; Mon, 21 Mar 2022 10:52:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=mg5nyJ1R0lAWavfqTCDZdNNXd2xeoGTZtPcXy5k/ivs=; b=nm8X73RAJjKTMeo71Srp VChMJELmMznVENaUPzgacKISOOXVW21kseex/ZC28cYQk9Z506NymWhvWD7IvgWMzayybKI9ZJuCB PHcm8zB4v8HCRGRL4X+mqj+RuKSQgNP5WVqWZSerQjWC/4TFuGPEAuPO6SisFWJiBwDq1SE2vHHhk Niu5yzMILG0gN7XuG8QHSMDdpDLuP1D1lcr3QBA1BBQk14pM3eTgthvWPSiEjwla6n1l6meJ5n1SB ET/kSS7urgBv6xF08x5A5m0KlWJDi0YKCipNTMH7wqzhmK5R7dEMD9Hq4qPkbgCFaB0rwe44Lh+TZ CC3F6Yr2tT/7Nw==; Received: from [87.69.77.57] (port=3148 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWJOe-0008I1-3l; Mon, 21 Mar 2022 10:52:36 -0400 Date: Mon, 21 Mar 2022 16:52:21 +0200 Message-Id: <83o81zfjdm.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <87v8w7pfh7.fsf@gmx.de> (message from Michael Albinus on Mon, 21 Mar 2022 15:06:28 +0100) Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org > Date: Mon, 21 Mar 2022 15:06:28 +0100 > > (shell-quote-argument ARGUMENT &optional POSIX) > > Quote ARGUMENT for passing as argument to an inferior shell. > > This function is designed to work with the syntax of your system’s > standard shell, and might produce incorrect results with unusual shells. > See Info node ‘(elisp)Security Considerations’. > > If the optional POSIX argument is non-nil, ARGUMENT is quoted > according to POSIX rules. Thanks. Please augment the last sentence by using "according to POSIX shell quoting rules, regardless of the system's shell." Or something similar. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 11:02:20 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 15:02:21 +0000 Received: from localhost ([127.0.0.1]:37842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJY4-0007xP-Jo for submit@debbugs.gnu.org; Mon, 21 Mar 2022 11:02:20 -0400 Received: from mout.gmx.net ([212.227.15.19]:50133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJY2-0007qe-9E for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 11:02:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647874931; bh=4RuzL8ZrTClElUYipHNJZdY/TXLBmOJfiZsjE6lAQDU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=RyczUC5dn6M7P2T8deOzq21G9eusuYNJcA/AMmXJSL8Nnt3gm4jmcKlksFwYLZRQr X4+zsGzcYjaeb7dnUKNqw02DlyqWkb5nNdzhgeDrtuAIJT0iAr08iHH4hWPpM83n+j QxPJZ5K9xT/+Vqh4rUStg5bD3nIHJ8sdqbL7WRrY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.118.124]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M3DJv-1nVV8Q1885-003ccT; Mon, 21 Mar 2022 16:02:11 +0100 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <83o81zfjdm.fsf@gnu.org> Date: Mon, 21 Mar 2022 16:02:09 +0100 In-Reply-To: <83o81zfjdm.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Mar 2022 16:52:21 +0200") Message-ID: <87r16vpcwe.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:+Vdepme6sZry6ffRcKEww2mulf3QnwWIARWaNQ595GQPArmUqm7 p/rWG0cglhg0vRl9Y8LvmudWV/5qBLsh9eqY9qsG6Ek1UPaQ+JXBTEYL5JFj9fefEv0WYuM z9DTBnzeTA6B8eyvfeI4U6VR/hn9ddPOEmG8ngDph2EZ62S1LYrIIRFiTnBhzdtjf45sKI8 OMw/WjZUUE6QAvrpZnKpg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gA2qznsjl1E=:9RjU5NNPxkkqM3ZmlUiY+9 7vL8M0bp7+BHrxJO5FQRLiQjACsfyoZOkuGcwLhkBi2FVcSkYscOUSKL2dAdAwZmOKXdJh/BX 7OkFgU4VJsH3PsRT1DvWWjZ0yy6R/2MFXL6n7Pp/ACw3MVkvB9C5cLWtiwotuLOaq5RT9d1VS 7Fd4oteyJwk7V2E4aBHc37XVMzH3WWAvl7hRYXk6Ayfk/C6ee73P9OlI9bFiNwQrZXbxCMpEY O9kb4TzlvCHS2I2kC9J1myTpDbZ7kdr5EA8FjTaj28mYvx6QdX4c/dACEyk5KaaRiLoTtPVF8 R5viGBU/dfl7z+YrgsXcO6v8liEEwBbvDg7SfLVp3mPrtTEiCxBBmKdgZ8Gi8zF2BHf7/uxQG F0cbzr/SYlep6pZA/VOtqGqeiJ9VGjUb32zU2qlbYAfP/bZR8rNmT6LsT6iXxhXwHi9/yC2R4 i/pnzlHF7LQPcIV693U5nO7ksmaNMYznTacLwGe1MO+0SMYO4SwF75vi/8FqjaisDueB7cwqy dIG6yehgLmDfzndJn6lj5WmM/m25wzoBdhtrKr8ij1/7C9837SVbp5eEqYkYq1ZSM4Ae2inOa ykloZPIxRshDxBmd1o7gLPSQxfF+CXPhULOg+ZcESVVjocCsZ70EdMhBQ1vRru+2BtcS3Uj5X lbYwqghY6LIv+vKLpj9sAofsKM9KJWTt32jJBQsmj/iNkgvOos8QZOnXYCCDA12mlwOLjRXIM WCuFWEcs9PndUlWiNMpTQIvUaxDrPTweTPnoM3dmoE4L7yRaFtGeIu2J7BfPp8K7Iqd3D0vEe WRIt/vnlzVuZNDJhI4ctt1H3NbZ5EXKAXLKmsl6cvYB8Jn3xAzErh06kjqvWoiZPcKUocEPMM CTkly9A5pCga2GrAmn+7PRko5/CYqpBjcuuc3XBYjQoeVWDLUfhAxlXFB87s7NHxMR0fbJxDa IbO2y5JPb3WPbEboCMaf8zEE+CmEum0IH4KNKhX9QaVNwBGJByG7HTSjrt6cm0J0rVHQcBqsk gtGNZrkflVRf2dwM11oLdRJ5oNGbNZiwmvlmle0QgxXxrABBjcB/pAAsRUduNqvAzUBTrtb3H pqu0feMSkA20Kk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: Hi Eli, >> If the optional POSIX argument is non-nil, ARGUMENT is quoted >> according to POSIX rules. > > Thanks. > > Please augment the last sentence by using "according to POSIX shell > quoting rules, regardless of the system's shell." Or something > similar. Sure. I'm just testing the full patch, and it looks promising. While I'm at this, I'm thinking whether I shall change computing of grep defaults to connection-local variables. This would be more in line with handling such local variables in recent Emacsen. WDYT? Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 11:06:01 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 15:06:01 +0000 Received: from localhost ([127.0.0.1]:37847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJbd-00089G-5v for submit@debbugs.gnu.org; Mon, 21 Mar 2022 11:06:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJbb-000890-9x for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 11:05:59 -0400 Received: from [2001:470:142:3::e] (port=43778 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWJbV-0007cs-VJ; Mon, 21 Mar 2022 11:05:53 -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=mReXIB2om1RADidGQUVNEGxGu9wFjJhNFSztD0CTDJw=; b=iOs9Q9xuEmRD h63ONam4dSYcarqBtU51F4gqkDbqc64Cd4wlssw3B5QoCT+jF+AMDFVTg1A457eemB2opaKCZgi85 aNNaPJybdBSWwTQlIFT0RthZ0Zjc177CVUDJ9z1a9FwcX17cLc9YWEuiNusy+PscylgO4c8bpgHNn yOSGsG6EvgDt6+t09O2031mPbHUlyFzi05m9JGbXhM1KNPKoObyKOnj3rF++b/CYucVnf+qBEgZAK TRaZPQs82MVsglzTLZiUDAznQWNq2WP6jwm112yKedjE673G6T1Tl/o2CekuGKdTyjrM9bSaY0JEb EPSxuYHE4QQHVnr27YogKw==; Received: from [87.69.77.57] (port=4016 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nWJbU-0004Br-2i; Mon, 21 Mar 2022 11:05:52 -0400 Date: Mon, 21 Mar 2022 17:05:36 +0200 Message-Id: <83k0cnfirj.fsf@gnu.org> From: Eli Zaretskii To: Michael Albinus In-Reply-To: <87r16vpcwe.fsf@gmx.de> (message from Michael Albinus on Mon, 21 Mar 2022 16:02:09 +0100) Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <83o81zfjdm.fsf@gnu.org> <87r16vpcwe.fsf@gmx.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Michael Albinus > Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org > Date: Mon, 21 Mar 2022 16:02:09 +0100 > > While I'm at this, I'm thinking whether I shall change computing of grep > defaults to connection-local variables. This would be more in line with > handling such local variables in recent Emacsen. WDYT? Probably. But I don't have enough experience with remote processes, so it is probably best to wait for others to chime in. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 11:10:00 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 15:10:00 +0000 Received: from localhost ([127.0.0.1]:37857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJfU-0008Fc-23 for submit@debbugs.gnu.org; Mon, 21 Mar 2022 11:10:00 -0400 Received: from mout.gmx.net ([212.227.17.20]:58207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWJfS-0008FN-FK for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 11:09:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647875392; bh=ku8grdw/4vFH4d1vBb7JrbF+TV/eXK8BitU4kMzYdhc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=H3HyiEe1TOVWrSUfJJhwE2Xz0FVyuWTKP//Aurn5gksjrEmyWU31Iyn7pmCzZNO01 QhauFpsaC35i+OSObi4kH5wqTIr25/qde6rDvwDLsH9ub58Z26hxRd2nO3rMjU6fpB Yqv/gNFtmuPt24j5QvgmbehHgf5h9AT5iQNA8jcU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([79.140.118.124]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8QWG-1nRtoV3T72-004PCc; Mon, 21 Mar 2022 16:09:51 +0100 From: Michael Albinus To: Eli Zaretskii Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <83o81zfjdm.fsf@gnu.org> <87r16vpcwe.fsf@gmx.de> <83k0cnfirj.fsf@gnu.org> Date: Mon, 21 Mar 2022 16:09:50 +0100 In-Reply-To: <83k0cnfirj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 21 Mar 2022 17:05:36 +0200") Message-ID: <87mthjpcjl.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:6lw1z7bFyln+2L5i0pVG2BqPnpJRibe18Eu9SFLGbCENg920mzS x9BJOR0grsbdIhCfs8480NF9SRxX44mD6ONqyoq7xQbKgHlOI25pfj/RrHCeCcF85fXbbEG yk5gY0gwyvV62M7ARxVHQnSZKOfe6i2yNuyfIVpE4o1ozv2mJyweHip/ub6PQzc6Itta22C 9ZQ44cZbMbkm73JXphr+Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:ew0twXp0qKk=:GKzoPELDHNDH9i+iGuPnfm q7pooaf81abNsaf6IroqgnnRQ+AB5SYzLRxiLkk3a9gsHvL13rQD0PzpM4T+xaQ+/F5eZHTO1 lIy1jugdAuESBbATf8QTXyxN0FYd6esy40kC5Xx86hA8q2yoyrXYyesOVPwSs0MPxfL3GV16+ /puntZ7TLIWqboyvFcT/abicAnD8lLZJTYgywcf2VRu0/pYpsEZlfzFknNaP2dW7OgFX9fexk hTONmjyyS605uMuS4PbHxniWXMPI/EIDv8NwuASrGSpHcHyelTMkuOSqpTNCroEldEbRDU+tK lnL1IeakhDmKJ84hwEIgsJNv5b9DMnSOHnpzlKSy3oxKGFGAvfh+PHRAS8qSkeW+WNtZqeAB3 Z05deQd2D6UKaO/L0j2HHhOLv+rguJRKlQxMwKp6QA+J8NiKDqI/T/yUfJ9zA5cOtBH18gkKZ dMevn9UyHHbVCePJXFthveEgir1gwZNdrsd/N8zFxqKQ1gofJyrLv5zEDTIiOVtv5SPrmt4fe N92tm0D9ni+JmyFR90DU3LmAjEIYgtAkAajzHJfH8apdGlNQKx2MzO+UGAK7GAj+xT4THP8Ux 84tMKR2L1y9TLr6tDnt7K3rJ/vs+zYTbNalEW1nhic3JOyRbe72s0ir5CvQNEUU4GL/XXzNDE 1ncvPvz7OmKgNLA/fAHJQVqYpgPxNv7hiy6O9SbEIwHpxp64X+GlEEXbwOUmKaxMEbwCYXSgk TcnuvtH7BpwMiFtfpfZbeDMnBXv7SHNWMXUodKgPX4PIA87AfgjfMLd0/Yw53AI7AJkflNCUb hM2LHt1FTWLH0rpfSYFpT/49KrRMbONA5K7OBmHyewCgXVGWvs0wG7+Ys0uieH1kgVJLmmXJr GcQkSIlSDDqcOI974NqGPTrYesk0GCLQI3tqqwDsZy5foWKllBQowJud/YVNsqfEqeW63hxur YWvGtL6a14jXedL5FWB6uSJfKAqxwSnGrmbtCV8wuYarMfwLWDgBdUzFs8aQd1oRXuVfNXl80 0BUkvOrqZYmQAbmlRw4Cov9qG826hS6bPBOXgHfBu/xsWr8nr6JZdkPnS7EnCH1D9GN4rEQI3 qvxUibxPL802/g= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: jporterbugs@gmail.com, 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: Hi Eli, >> While I'm at this, I'm thinking whether I shall change computing of grep >> defaults to connection-local variables. This would be more in line with >> handling such local variables in recent Emacsen. WDYT? > > Probably. But I don't have enough experience with remote processes, > so it is probably best to wait for others to chime in. OK. Anyway, I will push first a patch for the given bug. Other changes, if any, will be different patches. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 21 14:04:41 2022 Received: (at 54487) by debbugs.gnu.org; 21 Mar 2022 18:04:41 +0000 Received: from localhost ([127.0.0.1]:38170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWMOX-00078M-8t for submit@debbugs.gnu.org; Mon, 21 Mar 2022 14:04:41 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:39634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWMOW-000789-2n for 54487@debbugs.gnu.org; Mon, 21 Mar 2022 14:04:40 -0400 Received: by mail-pf1-f181.google.com with SMTP id u22so4776446pfg.6 for <54487@debbugs.gnu.org>; Mon, 21 Mar 2022 11:04:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=g3ppqSjGzVvf37LzCAsw0j99HKiwRUa/LXitVbimkFU=; b=XLsJ2sq/nAkpJDx7DhAxBXBE2vnLxv7ThATvr8Rln7FoCR0HTcLbXb9ems2S3KwKS1 eb5ArT/hnt5+rgoxKKGDSDskdHl9tcl/QEV2gaRJt1tfRyY6kgZ2eZgQh394jr6TNZ0I zR/VuQ8peRFUuaRMdKKDheQVzP8CHLo46QecB9f47OX4arZt5/ne58nvMazkGi4eJ+u9 isCE2mxtG9AV/wRsH9Y1oPera2dqKLvTOyWNJRciOa6/ChJlFysPxh8t4cPL15gYNHro zGoDKm3HkJjfcdh6G5poFN7eTZxamr7AxCp3tKt2iYBRon9OlWDUvNax56N4w+sNy+B6 T7Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=g3ppqSjGzVvf37LzCAsw0j99HKiwRUa/LXitVbimkFU=; b=1tauGxcZANt3SY0hbhRhT1lla/XOeoMMAHBEE6OdX14BKVxVrgkbyCSPALyR998mDd Q0306ZzLnGWnOlv9Z0D6Ngo3QXm+PI/dFR53doPX1M/l9k99grcY1IH4RQavKgSLrdx4 WSEbZQbWlCbH/dRVAEX+jVNkbmiO3NSl24qiKkpXD5zNEX08KKsrpN27fVE7f3t2gcNy 659DMQMyhLheKtuMDK1/vxafxDCi+aRyO4B0RN/8cEHnjHFSS3fAnlCx0HUDpcZs6Pmw x1vs3iCQVtgWWlE6o+5SUcXnL/zOKegFW6WuG/iIEOeDot9l0l+Ov8wgfuKPd3EhX2NG IG3w== X-Gm-Message-State: AOAM533u06KQLq0jbrEKdUb3zTZSe7DOglWub5H7QRnzQJ/AotdmhCvo s4JkwSc0vMdfhFnYfMa6S0M95unmFz4= X-Google-Smtp-Source: ABdhPJwOeQw+rOfncsL7QDp9H23HyCXyXsEVV04bBCfnFHzUfugAz6XuQig/04XKgtkb14FwX8XwEQ== X-Received: by 2002:a63:540b:0:b0:380:a069:c53c with SMTP id i11-20020a63540b000000b00380a069c53cmr19042965pgb.31.1647885874204; Mon, 21 Mar 2022 11:04:34 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id rm2-20020a17090b3ec200b001bf5647492esm134557pjb.20.2022.03.21.11.04.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Mar 2022 11:04:33 -0700 (PDT) Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp To: Michael Albinus , Eli Zaretskii References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> From: Jim Porter Message-ID: <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> Date: Mon, 21 Mar 2022 11:04:32 -0700 MIME-Version: 1.0 In-Reply-To: <87v8w7pfh7.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54487 Cc: 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 3/21/2022 7:06 AM, Michael Albinus wrote: > I'll wait until Jim confirms that this works in general, then I would > apply a patch along this spec. The patch you posted works for me. Setting `shell-file-name' to "/bin/sh" worked in my tests because it makes the function `w32-shell-dos-semantics' return nil, so this condition in `shell-quote-argument' isn't matched: ((and (eq system-type 'windows-nt) (w32-shell-dos-semantics)) That makes the shell-quoting use POSIX-style rules instead, which is what we want if the default-directory is remote. Reading that code, I think the `w32-shell-dos-semantics' part of that condition is there to handle things like Cygwin builds, so maybe it's not quite right to rely on that for the case I described in the original report. (That said, I think it would only be an issue for some truly esoteric configurations.) On the other hand, I think I like the idea of having grep be aware of connection-local variables even better. That's more flexible, and also should work for the reverse case: if you call rgrep from a Tramp file buffer, but change the search directory to a local path, rgrep uses POSIX shell-quoting. It should use MS-Windows shell-quoting in that case (since it's running the command on the local Windows system). From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 22 05:44:14 2022 Received: (at 54487) by debbugs.gnu.org; 22 Mar 2022 09:44:14 +0000 Received: from localhost ([127.0.0.1]:39211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWb3m-0005NR-DV for submit@debbugs.gnu.org; Tue, 22 Mar 2022 05:44:14 -0400 Received: from mout.gmx.net ([212.227.15.19]:42287) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWb3k-0005NB-8Z for 54487@debbugs.gnu.org; Tue, 22 Mar 2022 05:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1647942246; bh=VYyitCPmBmlH/ZLE1HAJu1kfqaQeGJfMZ4Os5v97daE=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=ZERHmOLerkovqZ7Cpn0hDbGser3dI3YwKTLENVMU+pMyL8smKOWi/H4w/OjYRiCbX LGQycvdpza4TXRcl+cN9lGLXN19dkCUhIpOUlkIze26D1rH++1taofubWUdNlfrhAM ZtuuXrPYesX/UElGgFfHtBQPb7d8BF+tNkpl7ohc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.210]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1McpJg-1o6Cn939hC-00a0Zf; Tue, 22 Mar 2022 10:44:05 +0100 From: Michael Albinus To: Jim Porter Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> Date: Tue, 22 Mar 2022 10:44:04 +0100 In-Reply-To: <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> (Jim Porter's message of "Mon, 21 Mar 2022 11:04:32 -0700") Message-ID: <878rt2pbiz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:rs4hHt08yWpRQFNsDYJsaml9GK6VrbzgM2QdVQu4XXOb4s1vwU2 pQOEsZ15JTCcLftI8EAvAO2VAa4Eq9mPekocCQ17cNrNPMI1mD7V7NG6UipbWQOBEDen8IX RGGkQwaieffjxgj2xaX+2NUyCSOtsYljKSsbxjr2FPgEogHSLEKhUO/ZBbx4LU0O+X1LRkG NHYrIJpo4M6mVrhJ5z08g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8vnGpueSGOQ=:BsIeptsyAOYs+zVdtDUxFu otqqxkkbT+u4igMxiBrACqdTNr9x5gsYIh8N3Tup9BbXG5eRwymOj1Fgq+jhryv1N0bpOVQbU XUxicS63k0+tikFLCM2G9VcaeaxJ/EFvOl1a66JXa8Ul7I7F2A8OwpsGb4m6DafS0fDpP/NKa hTwRPove1DKQMWOC1IFi6CiX6Uo1esUUwJIM+MKE9bStMzGa2Mg2k9Zc4IoHjE1LbwWjqHibK fLopgoumOBU9/NZ0OfFDFKzgaZdKNtEmXrvtTqlr5wJFlyn0R0t/VBGrOpT35VOBUBiW+DYT4 L7NaBXhIHRqTvPft1dJc6yl/SzRl7l+6BR7PAWBtBO8wkaJQyDlikk0iRf08ysWryB6U9cmqC P7A/IaYwIhj8nZ1QJIIqebpNqvpLUVMSr+kVHqZnSiFHU7m6CnefbLKywXlBTNLgh/5Bp5400 ohohd/ed2lMuWwZMGA0FgK7ugHoSKEwkuZV4MFn+psGAXrhkz5rQ45mCechsFI1CXAwKDCUgA 3PcQUZmRg8Jd+p5RZxE/mcvOKS1fUYgxETeP10LUfAsgvUp/zLbu62m1DwvnTycyUpKZ3Is45 9+K5DXCC+N+RmfKAwv9xwOUOrEsc6oygQrAwSxAtFuBWI6c4P6otBZ3Le0po0Qu0DlCS+eHp2 qauYhoh+rzyr+b/R7n4UWEBkHHghFWrxRNCkU9wXQNZBTjyWAP3flZ19LxtXGrMzWVxzi2h/E RrlUgptqhNI380tUuwR28XeX3Uuw7QuW7EnB2wu3YD0W7j9mYKqkovbrMmQxvdCCS5fSX6EPu peCqYO3rl6R76VHOY+a6MEIR5se0gGa1VxuBqxbs83jKcvaq269wy1AsWDbSu2ww0fvoMuyDe tpfhNjanQXTtJ/iV7WqYYJVZpKHodD3KYFu14BWBEUwDjKOrjJxStiQ1HplSlPPHouFBFKQDx w5K177mbZW+2UwUgg7pn/d/GhtV140lDMFuKHmZ4wR1q25Fq6iSE82hB31+L0KVCvolz89+ai 8LRt++bYli343h5EZsIOvGYNUG3d1XcBVWjf0jy6U0P0laqkhWjKaD8HbOV9IrcenHu9OXCri KrCZrXm2vVZLMc= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: Eli Zaretskii , 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jim Porter writes: Hi Jim, > On 3/21/2022 7:06 AM, Michael Albinus wrote: >> I'll wait until Jim confirms that this works in general, then I would >> apply a patch along this spec. I've pushed a fix to master. It is different from what I have shown before, but shall serve as well. > The patch you posted works for me. Setting `shell-file-name' to > "/bin/sh" worked in my tests because it makes the function > `w32-shell-dos-semantics' return nil, so this condition in > `shell-quote-argument' isn't matched: > > ((and (eq system-type 'windows-nt) (w32-shell-dos-semantics)) > > That makes the shell-quoting use POSIX-style rules instead, which is > what we want if the default-directory is remote. Reading that code, I > think the `w32-shell-dos-semantics' part of that condition is there to > handle things like Cygwin builds, so maybe it's not quite right to > rely on that for the case I described in the original report. (That > said, I think it would only be an issue for some truly esoteric > configurations.) Fiddling with shell-file-name doesn't help in this case, because connection-local variables are not applied in every remote buffer, like in dired buffers. The more general collection of Tramp-aware connection-local variables could damage something else, that's why it is appled on programmatic request only. > On the other hand, I think I like the idea of having grep be aware of > connection-local variables even better. That's more flexible, and also > should work for the reverse case: if you call rgrep from a Tramp file > buffer, but change the search directory to a local path, rgrep uses > POSIX shell-quoting. It should use MS-Windows shell-quoting in that > case (since it's running the command on the local Windows system). Yep, I'll start now to work on this. The plan is to collect these specific connection-local variables in an own :application, so that they are set only with the given "grep" scope. For the scope of this bug report, it could be closed. But I'll like to keep it open for now in order to discuss possible problems with the connection-local variables approach. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 07:53:23 2022 Received: (at 54487-done) by debbugs.gnu.org; 23 Mar 2022 11:53:23 +0000 Received: from localhost ([127.0.0.1]:42938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWzYJ-00035W-Ka for submit@debbugs.gnu.org; Wed, 23 Mar 2022 07:53:23 -0400 Received: from mout.gmx.net ([212.227.17.20]:51883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nWzYH-00035E-UX for 54487-done@debbugs.gnu.org; Wed, 23 Mar 2022 07:53:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648036394; bh=pp7bDqBfzRyo8R3GjcEk4EfRqJCYH1bYA+hn5SZ9TFc=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=VVUY5tpLzNGB0FuDVN5Tv5BwhjFg1Of0EEuVLtwlfpU5ZYQEaA1KMgSPn88b9DndN 6lu68MWfdED87MpU1IeI2iSJcI5+cBKZ2jj6k5udQx22Ll/Du+3RCkFx66JAZclOsN +lDxM88faRp1InTqM8u/jXlCwScm8ZOYuuIVELXc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.210]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mqs4f-1nsuEK3oSv-00mrAE; Wed, 23 Mar 2022 12:53:14 +0100 From: Michael Albinus To: Jim Porter Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> <878rt2pbiz.fsf@gmx.de> Date: Wed, 23 Mar 2022 12:53:08 +0100 In-Reply-To: <878rt2pbiz.fsf@gmx.de> (Michael Albinus's message of "Tue, 22 Mar 2022 10:44:04 +0100") Message-ID: <87zglgopgb.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:w4+w3vpI8OPjgoWEWWmBK+2U8snhPiw5ANwQXB4SHuNJzHinRIn 37rGq6SWed28+ZPsm5fg7ge7YxUHFbsYtSxr6x+hzBXM5EWLPpNZJILpqSkJAOZIls7ajMb cECAjECoZi8zDWk6UbilVLXoZb1rJZ/epJfHKOYg5yPkY/k4t50iyEbPxyfpGkArWjc8/HJ Cy9PC7fGK0Hp7nFxbT02g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:vXwK3jimbuE=:kd12dmtyXIcEfIL712X/PO 8XSxSWqUL09fWXyo/2ZRmbb49f/CrLUxqRNd9wEjkpQFUldB1Zx+VRyqaSyogav0QQy+et+4q p/VCtgJAm0Gm5iFXlMLZycMruSstvUlz9fNMQsTVcW1BQBc5rqguAtZC4VuJz+0EYCkMyBVJ5 /6MByGa81ojcAk5sME1+etGc2vxu5wVKIr3csN6MWFrTUd0cRjNsR4ofsd1UY7kiD9A+q/pcY IxJ+9VH8v8e0/V3vSzOiU1/i32BAMT9V3j9seED0IT6QPOOnn5uxF1qDj2Wv3QgB1ImWbcjES K9ALM0mQ/4u76FPQ4ve+b2/TRf89Y06n1b/b4YnNEdsNIDMk2E1hYByGkIDUih2kSg10sjVHP tbY/Q+DMoSS0SKmmlDftULeO4bOga5+7HHy+JN9Ni+N6UeXXoy8BjKM3Ky9hiLARGKWWsWDE/ lekKUQFQbE+PzynTkHCxLLZ7H068MykLodzVgCBck3cbyhoJN82R+vhQeycN3bY2Ri7UwST9v 5IWkUWrmXgjfrFfqLKgPV0M/48+QmIvgYSKD3aX0zN0W6Vtp13qgJ8Z+vXqBPBKNIxABCukZx 1idtWkBsLlAFd6jkWsG7A9NttPB3TVOFDGna4xkZe/oEa/jE+eyxtw2I+/tmSU1lfsjxf9HCC i5C4swTZVTLyJ9fj8xT+95SEeA4hthfDiDrkfVTZy5oCTviMVY+HAgnUVk5YkKnqdfNKwp5+0 fHlKzQL1DjQXAZ3QXSsqpEE3xLQcWoOS5iIbLb2IZzwlmSu95OupY44WfuQh0zZALxjrTbKJW MEZGJUHuWkwkOjvBNJnjABgwayO3SqqFeN/DXpgyNZjjkit5Gp++em17SDLFQlcqTal9uoiDc AKlO9dDup09hxswG3B0VcVyL6CcxfJiGHILqEqO9JEP3oEBDSiZbXmurhO31HZsUOt4HuawCr hnzgxprV4pCzlS7MJ58Ls4Bq+FapIpelYmW/jDsA+c3noY3j0a0DLeFcEsQnE7e8/y9iaB8zw qB57II2ZqFnGgP6N8htJIEYzfzXSxTQKUc9WOMwTiMmQTXJSOgpSSBaFJ/i9/SdbmOFSUlFnb EEpYWDfa0FFeE0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487-done Cc: Eli Zaretskii , 54487-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Version: 29.1 Michael Albinus writes: Hi Jim, > For the scope of this bug report, it could be closed. But I'll like to > keep it open for now in order to discuss possible problems with the > connection-local variables approach. I've checked the needed changes, and it would be too invasive. In grep.el, host specific settings are computed by global variables. Furthermore, the compilation buffer is created only after computing these settings. This would require a larger rewrite of grep.el. I believe it isn't worth then. Closing the bug. Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 12:56:06 2022 Received: (at 54487) by debbugs.gnu.org; 23 Mar 2022 16:56:06 +0000 Received: from localhost ([127.0.0.1]:45699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX4HF-0006N4-QM for submit@debbugs.gnu.org; Wed, 23 Mar 2022 12:56:05 -0400 Received: from mail-pg1-f180.google.com ([209.85.215.180]:35469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX4HE-0006MQ-CB for 54487@debbugs.gnu.org; Wed, 23 Mar 2022 12:56:04 -0400 Received: by mail-pg1-f180.google.com with SMTP id z128so1617159pgz.2 for <54487@debbugs.gnu.org>; Wed, 23 Mar 2022 09:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:references:from:message-id:date:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=XARr18mB/JCkA0PZ2luNqad5nv7CPmPhOttBblNOZ+I=; b=WbUZ6TZEWPbnZbZlGtN2yMdlI2zgnnJfA/BnSeG850dh1Uro+ocfSlDTD8aCXZtqq5 B66Fye8DTUp/bZ6LWacwEz20FGAREvLQ8AXWdqMUamm2nyIvre6wJ31AZJGlO1D47GP8 bBiu/iHqaoSnUsAn5AM1uzzJOhU/xCEPK2A3OBh0bXO4sELaAf9i4ZAs+9LO9w1n3oAT oihZrvhh/M+9gCVjlM1mLm+zB56+fgo9We/alIf4+gQPr8+5MEABdjQbBnQMFeDn1BRy pvlNeZPV7GHfoYlX1RZenRpGOmqhPzb5/dzJA9lwaV/yhMq0zGLZWzhYBDLy4BKx7/CY AbFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XARr18mB/JCkA0PZ2luNqad5nv7CPmPhOttBblNOZ+I=; b=JGlSM05A2QvHqvQHzEQfMjJtXEP86gdmoYXAlBO5P0DIEtQ8oOtfsvifIkVEBV4+zf tWVNgooU+PkiW54N2pfWSMuiwaFJ8trSI5a7UAJK8Qi1DttUNVBa0A4dbnv8P3U1BdBg aZIsZyDZ7CtS4yYRBeZZmug+yf4Kv76O9KzmwBB3uN7bFxid9vkmdKGVwZDq+ZO/hhDT X3nF/aqvTJypBZYYFImZB/8qvTewGKsAVwjxLqLEb2TsXeoFPWi2CPuhl0JHZSwIlmg1 roI1KPoFLFfkejWm7W0IROHRTd2hly07W9g0iXGFzrIbTpinqrsZjboNTSzC+qs5a3/W WQmg== X-Gm-Message-State: AOAM531Sz6MNLhVy3bqsXX1E6J2R0rckhp1LWA2KJ65s0+MIJ89C2mZ/ EUGX/mHooOikWK3jtSuT6c8= X-Google-Smtp-Source: ABdhPJwKswltWZ3eyyb4EVMoOrm340qtdEmVY2IphJ7Zd6S+X++6JBdY40OLMHGTQyJDkfwOhWQ6tQ== X-Received: by 2002:a05:6a00:2311:b0:4e1:52bf:e466 with SMTP id h17-20020a056a00231100b004e152bfe466mr856314pfh.77.1648054558536; Wed, 23 Mar 2022 09:55:58 -0700 (PDT) Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id u12-20020a17090a890c00b001b8efcf8e48sm6635473pjn.14.2022.03.23.09.55.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Mar 2022 09:55:58 -0700 (PDT) Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp To: 54487@debbugs.gnu.org, michael.albinus@gmx.de References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> <878rt2pbiz.fsf@gmx.de> <87zglgopgb.fsf@gmx.de> From: Jim Porter Message-ID: <8a75f9c6-3fbd-23a9-9fd0-f2701cc9566e@gmail.com> Date: Wed, 23 Mar 2022 09:55:58 -0700 MIME-Version: 1.0 In-Reply-To: <87zglgopgb.fsf@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54487 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 3/23/2022 4:53 AM, Michael Albinus wrote: > I've checked the needed changes, and it would be too invasive. In > grep.el, host specific settings are computed by global variables. > Furthermore, the compilation buffer is created only after computing > these settings. Thanks for looking into it. I'm looking at doing this for a similar package, so if I can come up with a solution there, maybe I can see about porting it to grep.el too. If I come up with a simple way to do this, I'll just file another bug with a patch though. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 23 14:58:54 2022 Received: (at 54487) by debbugs.gnu.org; 23 Mar 2022 18:58:54 +0000 Received: from localhost ([127.0.0.1]:46036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX6C6-0001Uk-DC for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:58:54 -0400 Received: from mout.gmx.net ([212.227.17.21]:60725) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX6C4-0001UU-Fn for 54487@debbugs.gnu.org; Wed, 23 Mar 2022 14:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1648061925; bh=EiPatZ9x1FOq4BSv4CCf/J4PTaLBHMIOJhYOZL0bm7A=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=XwHq+cPrfm75jlu/s1yyqxSTpiT9ssamiL55phFJUIgBPWYWsJDZk9nMlB1hyt7bl jY9Zn6GAeqH7fqg/xKaS7QW5afbFdKHvyh/+4KzCXGvDIFKwsgRjo6KKJoxczSB3PH fPtKt0dXad8nSjTSrX+3O3jVS5sa8dhD3BpFedQs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from gandalf.gmx.de ([212.91.238.210]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBm1U-1nN9Uf2K7w-00C9vk; Wed, 23 Mar 2022 19:58:45 +0100 From: Michael Albinus To: Jim Porter Subject: Re: bug#54487: 29.0.50; connection-local value for `shell-file-name' not set in Dired buffers over Tramp References: <87y213bo13.fsf@gmx.de> <83wngneawo.fsf@gnu.org> <87v8w7pfh7.fsf@gmx.de> <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> Date: Wed, 23 Mar 2022 19:58:44 +0100 In-Reply-To: <2004fb45-f690-5fa2-be48-f9c1b7f970f9@gmail.com> (Jim Porter's message of "Mon, 21 Mar 2022 11:04:32 -0700") Message-ID: <87tuboo5qz.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:a4iJbWA5DgXi6orjkcL2R/5KF5eCVIEq1Uh8meLqGDaARfqYIZd k0gUOMENefCFog8ew3DkBQTIilWpMnPHTpWmWTzcb+OJQBOIb0aV8CqfJ3LRM9vQA8j40lL p5FZiWBNDikIlbj7w9tYkfq3APZalczRri0o4kt4pOSrp1B6+3V+8rbHBF88pQwfPCMW0QN mFiy5SccqiMUFM1hIivPQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:09Z8Bzm2LwI=:Ib7ZaevNvWM3wNECvstPyP 84FZqxcgKQN8TVQAvsgXsFhckPcHKIpbHlwnBRqT1P7ycwQJq7jlGmw0buwvARDJSizroKCUt 3pqa6mEl3wFGafPDTzpF3MF9NxgZgaKkOj6xXsnWxtO86mabR79D7BiNnmgZAmR4GD1PqbEvR 0OcvB6GjT8a5EyISsGXrxDQXegD1u4osaJwag3d4H+bS50wqJg2bL1tEzSktUSeb0GIZdpBbd FB/7rSSyxlAHkqPFWbpJMLZOuH4DoOeXcREKYB4jV/cjXBbtBNcvc6YRqHO2l5FKRhTt29gVL g7TxKnz/4BNurpxNJNKqUnio+wt2SHqFPBJ+HazbZQsqoOHm0OHtaSOhRaofaFpSUEBRHbznS WNxGnvX6bTtGXLc4mZGqR4FXDQ4rYGHAIL+wqvdBVuzyp626rCAZavGKtTzsj2cWAubHL/DGw skH6XhZVRiHSQSRTD/35t57hmStD3Jy910zQe+uFtsfD1MlJMwHcGA7Fz8krxPiOdyiNkjU3F Gbg40wWNdvy/2gJx6A98znPV5p8l1fZKosjAAb51vkUuBfnf4X3tKnindgITsTiqqIVIC/VHz EwLlFJ6KLF8Q59eIVtxEJ7JfHM0UKAu+WqD5z8iuUrXAvfrTP2DoyFVA3jEdwc2Z+18/BTxs/ vfjXxqBvPsHyi/WgDx1JYuUdhr6swKRuTb2hQctWuXUhsjzVwdL9RhrevDEAHNrZJJaPRJGBQ 3HrfO5E2z/GjrqzJW3XU2kwNL9JVJYqyHr2OSuIGZDWwnI9dSDDSnvftMTdmS4DM8z63pTfj7 HA1C6mTaL6sQREHHm+zZYLKiDVgKV7TWY3k2lntcmLvUGZ24vR34c4T6O4OWVcaxPvrQyNiLC yxb0sIfz3muL52Lv2XBubBMbsUJ3cUdGqRCVmbmvgqLkSqd8fJfalMI/0jHklypBHH3F/rwR6 QnblFLzTGbB0BiyFlnUaVoCUK9mM1fqw6408xgELS6kaozLMXchX1OThs8QcYChFtHN2YuFDf 0W69dGGMPBB4N+KvnL80grKxtYD1GQbQuJJAoVAmSGyTRDYwuVqdBSxcv8+V144h82sxUjwSo KNXXnbRq9L9vy0= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 54487 Cc: Eli Zaretskii , 54487@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Jim Porter writes: Hi Jim, > On the other hand, I think I like the idea of having grep be aware of > connection-local variables even better. That's more flexible, and also > should work for the reverse case: if you call rgrep from a Tramp file > buffer, but change the search directory to a local path, rgrep uses > POSIX shell-quoting. It should use MS-Windows shell-quoting in that > case (since it's running the command on the local Windows system). With commit ef0a0d30c5 this shall work now, even w/o connection-local variables. Best regards, Michael. From unknown Wed Jun 18 23:16:12 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 21 Apr 2022 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator