unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: "André A. Gomes" <andremegafone@gmail.com>, 57385@debbugs.gnu.org
Subject: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sat, 27 Aug 2022 01:12:37 +0300	[thread overview]
Message-ID: <a1ca0220-7419-4458-b1a7-74d59ab41fa7@yandex.ru> (raw)
In-Reply-To: <87edx311qg.fsf@gmx.de>

On 26.08.2022 18:08, Michael Albinus wrote:
> Dmitry Gutov <dgutov@yandex.ru> 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.

OK, I have just pushed a fix in commit 6edff5ac33 which will hopefully 
fit the requirements.

Andre, please test.

> 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").

Perhaps that's the value which is needed in this particular scenario? 
E.g., no bash installed on that system.





  reply	other threads:[~2022-08-26 22:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 15:17 bug#57385: 28.1.91; project-find-regexp fails over tramp André A. Gomes
2022-08-24 18:11 ` Dmitry Gutov
2022-08-25  6:57   ` André A. Gomes
2022-08-25 11:25     ` Dmitry Gutov
2022-08-25 12:36       ` Dmitry Gutov
2022-08-25 16:24         ` André A. Gomes
2022-08-25 17:44           ` Michael Albinus
2022-08-25 19:51             ` André A. Gomes
2022-08-26 14:32               ` Dmitry Gutov
2022-08-26 15:08                 ` Michael Albinus
2022-08-26 22:12                   ` Dmitry Gutov [this message]
2022-08-27  5:50                     ` Michael Albinus
2022-08-27 10:45                       ` Dmitry Gutov
2022-09-11 15:22                     ` André A. Gomes
2022-09-11 21:46                       ` Dmitry Gutov
2022-09-12  6:26                         ` André A. Gomes
2022-09-12  9:03                           ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1ca0220-7419-4458-b1a7-74d59ab41fa7@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=57385@debbugs.gnu.org \
    --cc=andremegafone@gmail.com \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).