[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57385: 28.1.91; project-find-regexp fails over tramp
From: |
Michael Albinus |
Subject: |
bug#57385: 28.1.91; project-find-regexp fails over tramp |
Date: |
Fri, 26 Aug 2022 17:08:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
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.
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.
- bug#57385: 28.1.91; project-find-regexp fails over tramp, André A . Gomes, 2022/08/24
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/24
- bug#57385: 28.1.91; project-find-regexp fails over tramp, André A . Gomes, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, André A . Gomes, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Michael Albinus, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, André A . Gomes, 2022/08/25
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/26
- bug#57385: 28.1.91; project-find-regexp fails over tramp,
Michael Albinus <=
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/26
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Michael Albinus, 2022/08/27
- bug#57385: 28.1.91; project-find-regexp fails over tramp, Dmitry Gutov, 2022/08/27