From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#57385: 28.1.91; project-find-regexp fails over tramp Date: Fri, 26 Aug 2022 17:08:39 +0200 Message-ID: <87edx311qg.fsf@gmx.de> References: <87a67tu0v4.fsf@gmail.com> <2e421b32-0187-4ad3-e7b0-eb6ae5049293@yandex.ru> <875yigu7y4.fsf@gmail.com> <84136a7c-1ab2-c464-e6c9-d6c3509551c0@yandex.ru> <65687c55-7363-7443-e39a-768dd2869aa7@yandex.ru> <87k06wuw8k.fsf@gmail.com> <87o7w843rx.fsf@gmx.de> <874jy0m78h.fsf@gmail.com> <13dc47c2-0aa4-ea4e-9ab0-da5abcf363cb@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: "=?UTF-8?Q?Andr=C3=A9?= A. Gomes" , 57385@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 26 17:37:42 2022 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 1oRbOu-0004P9-1T for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 17:37:40 +0200 Original-Received: from localhost ([::1]:45738 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oRbOt-0004Gs-1g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Aug 2022 11:37:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oRaxC-0001i8-Id for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 11:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36350) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oRaxC-0004gq-8o for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 11:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oRaxB-0000D0-Q0 for bug-gnu-emacs@gnu.org; Fri, 26 Aug 2022 11:09:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Aug 2022 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57385 X-GNU-PR-Package: emacs Original-Received: via spool by 57385-submit@debbugs.gnu.org id=B57385.1661526534786 (code B ref 57385); Fri, 26 Aug 2022 15:09:01 +0000 Original-Received: (at 57385) by debbugs.gnu.org; 26 Aug 2022 15:08:54 +0000 Original-Received: from localhost ([127.0.0.1]:54332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRax4-0000Cc-4m for submit@debbugs.gnu.org; Fri, 26 Aug 2022 11:08:54 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:49953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oRax2-0000CM-0Z for 57385@debbugs.gnu.org; Fri, 26 Aug 2022 11:08:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1661526525; bh=+5jRxinQWDVCRSLlw9sHqyNBk2yQLIXUjlNdUMzdRkw=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=cWabmWBI8zZGsz4w2KI0HQl9hbAu/Dmtv3CLjpsXw99j82hNXLlguo5P58HLBpOGT AY2nS0JBCfz955I/vjF2nuik/wdnD9nryEgr1vfjFM/nc4sMDwzPUAbv6w5YHLa6EU B24PIGdFYP/G0HW7yBIBBC5eGpLRpHYTDjqUnkms= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.156.6]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MQe5k-1opCKw0WBi-00Nlmp; Fri, 26 Aug 2022 17:08:45 +0200 In-Reply-To: <13dc47c2-0aa4-ea4e-9ab0-da5abcf363cb@yandex.ru> (Dmitry Gutov's message of "Fri, 26 Aug 2022 17:32:08 +0300") X-Provags-ID: V03:K1:dOXpZGOw8aAbBsZlNkGguudT/cDbUXje8tHAqUg0IwvE193DLwF WdmiPMKQ/WBN8n5fwmklCvKjR9nEQM/BLRdTY/ExSwAtcczEXVWyAukO2dNeNIExRueJH5n WXwkjQoKD0NFuOYWkSVRJgAuCnG/sAJPf2KihSe0ypppOM0YV0jMaJWf1G67fZRtl7hGBXa Uvqx31SgoArt9ygGQqW7Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:e1oUMmUTZbs=:i6OG9LZKS5KTdhs0h9Pta7 O2qEhjqzDNJwpfSaM5D2MomRvrWXeRMvUYD9WrF7odkltrUIKFMtt0FnUuKX8Seh/z675uFqj 6ajJqtoAGfKlwJzrbdF6VSlpNiG/nqRgNniASfYtG+Xo6yOZbjimEFGJGfPQ9gwe5rwHkijmB XOkFYH44trnOin83ABcHqmsKt10bQ6bNlNu1cNjLEbtHh75GI7L4vhEY8X5fww/cqzq0pM8tu HWrXsDefhFQH23yxFIUkW+M2jag0KCXMPNPemKXuAq5oLtYSKGxQo8uiOMFxb/SOV1B8ehOwU TmhGH77Bj4Wm+Kf3ci94badbVxelwWib1dcyNahmtrdn/20OvHykeYJfF5NYlRI7xct9+pofW FZveuQLry+3iwJzoLVQieQsLMEn+99i+E82JsyGF2sCw0ci+Zm4KIyFbmR6ftyB5vixwinknt KWIw32WsehhfHJeaLon0k4UKEQeB4DM2aFMUrhmVbMtwYJwJzTM27Mi7V19IlbS4TdIxcl6Bd 3VZMUa6q/fb3ApJ+dpln2xMO14PYiSJpsw5KM/bUPJR5WvvbrBQ97Ibw25maC99xQrsdQ0qFH G9GJf/TaPV2e0PrYxE6Ikt962Ae4M2trX1cwF38vmXtvjHwxzklnxu3vebHungJD+YeJCEq39 rV63S+cguYqnW4V79bWGp1wmHv+vxLp1MyICRQBTjnlcT8YGLqeY0uZkurzQqRSK6nYMLDWP0 ka2I8vTRaBSBkppLfGIOXxpkIdXI8jRpUjfh+0nvJ+36hOhft/F8lAi5EY5u0yrRlJqaK3Cg 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" Xref: news.gmane.io gmane.emacs.bugs:240846 Archived-At: Dmitry Gutov writes: Hi Dmitry, >> Dmitry, I tested project-find-regexp over Tramp with a "mundane" >> system >> and it failed regardless. It seems I figured out why. Shell-file-name >> (in xref-matches-in-files) seems to get its value from the local >> machine, not from the remote one. Therefore, it can't possibly start >> the grep process remotely. Any on how to fix this? > > Right. > > Michael, do you perhaps have a suggestion how xref-matches-in-files > could use connection-local values for shell-file-name and > shell-command-switch (when available) without losing compatibility > with Emacs 26.1? Hmm, the usual recommendation is to take with-connection-local-variables, like (with-connection-local-variables (xref--process-file-region (point-min) (point-max) shell-file-name output nil shell-command-switch command)) Unfortunately, the macro exists since Emacs 27 only, so you need to test its availablility, and to use progn instead if it doesn't exist. There is another trap, Tramp sets already the connection-local variable shell-file-name to "/bin/sh". The user must overwrite this (or Tramp must be pimped up to take whatever the user declares as "remote-shell"). Best regards, Michael.