unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57385: 28.1.91; project-find-regexp fails over tramp
@ 2022-08-24 15:17 André A. Gomes
  2022-08-24 18:11 ` Dmitry Gutov
  0 siblings, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-08-24 15:17 UTC (permalink / raw)
  To: 57385


Hi Emacs,

It seems that running project-find-regexp fails over tramp.  Any idea?
Thanks.

Here's the backtrace:

--8<---------------cut here---------------start------------->8---
  (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t)
    [no locals]
  (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))
    [no locals]
  (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t)))
    [no locals]
  (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if (string-match "\\./" i) (setq i (substring i 2)) (setq i (concat "**/" i)) (if (string-match "/\\'" i) (setq i (concat i "**")))) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files (concat default-directory module) backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files))
    default-directory = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
    vc-git-use-literal-pathspecs = nil
    dir = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
    backend = Git
    extra-ignores = nil
    args = ("-z" "-c" "-o" "--exclude-standard")
    files = nil
  (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if (string-match "\\./" i) (setq i (substring i 2)) (setq i (concat "**/" i)) (if (string-match "/\\'" i) (setq i ...))) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files (concat default-directory module) backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files)))
    [no locals]
  (cond ((eq backend 'Git) (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if ... ... ... ...) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files ... backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files)))) ((eq backend 'Hg) (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) args) (setq args (nconc args '("-mcardu" "--no-status" "-0"))) (if extra-ignores (progn (setq args (nconc args (mapcan #'(lambda (i) (list "--exclude" i)) extra-ignores))))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (apply #'vc-hg-command t 0 "." "status" args) (mapcar #'(lambda (s) (concat default-directory s)) (split-string (buffer-string) "\0" t))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))))
    [no locals]
  project--vc-list-files("/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/" Git nil)
    dir = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
    backend = Git
    extra-ignores = nil
--8<---------------cut here---------------end--------------->8---


In GNU Emacs 28.1.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Guix System

Configured using:
 'configure
 CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
 SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
 --prefix=/gnu/store/c36vz6k65nvi3lbawcmma4wpy5m6cwr2-aadcg-emacs-28.1.91
 --enable-fast-install --with-modules --with-cairo
 --disable-build-details'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM GTK3 ZLIB

Memory information:
((conses 16 720251 121643)
 (symbols 48 59845 80)
 (strings 32 215755 11847)
 (string-bytes 1 6865269)
 (vectors 16 125544)
 (vector-slots 8 2419028 75894)
 (floats 8 1097 746)
 (intervals 56 4478 1261)
 (buffers 992 62))

-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  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
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-24 18:11 UTC (permalink / raw)
  To: André A. Gomes, 57385

On 24.08.2022 18:17, André A. Gomes wrote:
> 
> Hi Emacs,
> 
> It seems that running project-find-regexp fails over tramp.  Any idea?
> Thanks.

Hi!

How does it fail? Does it signal an error? I don't see that in the 
backtrace.

> Here's the backtrace:
> 
> --8<---------------cut here---------------start------------->8---
>    (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t)
>      [no locals]
>    (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))
>      [no locals]
>    (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t)))
>      [no locals]
>    (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if (string-match "\\./" i) (setq i (substring i 2)) (setq i (concat "**/" i)) (if (string-match "/\\'" i) (setq i (concat i "**")))) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files (concat default-directory module) backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files))
>      default-directory = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
>      vc-git-use-literal-pathspecs = nil
>      dir = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
>      backend = Git
>      extra-ignores = nil
>      args = ("-z" "-c" "-o" "--exclude-standard")
>      files = nil
>    (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if (string-match "\\./" i) (setq i (substring i 2)) (setq i (concat "**/" i)) (if (string-match "/\\'" i) (setq i ...))) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files (concat default-directory module) backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files)))
>      [no locals]
>    (cond ((eq backend 'Git) (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) (args '("-z")) (vc-git-use-literal-pathspecs nil) files) (setq args (append args '("-c" "-o" "--exclude-standard"))) (if extra-ignores (progn (setq args (append args (cons "--" (mapcar #'(lambda (i) (format ":(exclude,glob,top)%s" (if (string-match "\\*\\*" i) i (if ... ... ... ...) i))) extra-ignores)))))) (setq files (mapcar #'(lambda (file) (concat default-directory file)) (split-string (debug) (apply #'vc-git--run-command-string nil "ls-files" args) "\0" t))) (if (project--vc-merge-submodules-p default-directory) (progn (let* ((submodules (project--git-submodules)) (sub-files (mapcar #'(lambda (module) (if (file-directory-p module) (progn (project--vc-list-files ... backend extra-ignores)))) submodules))) (setq files (apply #'nconc files sub-files))))) (delete-consecutive-dups files)))) ((eq backend 'Hg) (let nil (let ((default-directory (expand-file-name (file-name-as-directory dir))) args) (setq args (nconc args '("-mcardu" "--no-status" "-0"))) (if extra-ignores (progn (setq args (nconc args (mapcan #'(lambda (i) (list "--exclude" i)) extra-ignores))))) (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (apply #'vc-hg-command t 0 "." "status" args) (mapcar #'(lambda (s) (concat default-directory s)) (split-string (buffer-string) "\0" t))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))))))
>      [no locals]
>    project--vc-list-files("/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/" Git nil)
>      dir = "/ssh:192.168.1.82#8022:/data/data/com.termux/files/home/repos/ecl/"
>      backend = Git
>      extra-ignores = nil
> --8<---------------cut here---------------end--------------->8---
> 
> 
> In GNU Emacs 28.1.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0)
> Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
> System Description: Guix System
> 
> Configured using:
>   'configure
>   CONFIG_SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
>   SHELL=/gnu/store/4y5m9lb8k3qkb1y9m02sw9w9a6hacd16-bash-minimal-5.1.8/bin/bash
>   --prefix=/gnu/store/c36vz6k65nvi3lbawcmma4wpy5m6cwr2-aadcg-emacs-28.1.91
>   --enable-fast-install --with-modules --with-cairo
>   --disable-build-details'
> 
> Configured features:
> ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
> JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
> INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
> X11 XDBE XIM XPM GTK3 ZLIB
> 
> Memory information:
> ((conses 16 720251 121643)
>   (symbols 48 59845 80)
>   (strings 32 215755 11847)
>   (string-bytes 1 6865269)
>   (vectors 16 125544)
>   (vector-slots 8 2419028 75894)
>   (floats 8 1097 746)
>   (intervals 56 4478 1261)
>   (buffers 992 62))
> 


^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-24 18:11 ` Dmitry Gutov
@ 2022-08-25  6:57   ` André A. Gomes
  2022-08-25 11:25     ` Dmitry Gutov
  0 siblings, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-08-25  6:57 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 57385

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 24.08.2022 18:17, André A. Gomes wrote:
>> Hi Emacs,
>> It seems that running project-find-regexp fails over tramp.  Any idea?
>> Thanks.
>
> Hi!
>
> How does it fail? Does it signal an error? I don't see that in the
> backtrace.

It signals

--8<---------------cut here---------------start------------->8---
split-string: Wrong type argument: stringp, nil
--8<---------------cut here---------------end--------------->8---

The issue is that

--8<---------------cut here---------------start------------->8---
(apply #'vc-git--run-command-string nil "ls-files" args)
--8<---------------cut here---------------end--------------->8---

returns nil, in project--vc-list-files.

Does this help?  Thanks.


-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25  6:57   ` André A. Gomes
@ 2022-08-25 11:25     ` Dmitry Gutov
  2022-08-25 12:36       ` Dmitry Gutov
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-25 11:25 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 57385

On 25.08.2022 09:57, André A. Gomes wrote:
> Dmitry Gutov<dgutov@yandex.ru>  writes:
> 
>> On 24.08.2022 18:17, André A. Gomes wrote:
>>> Hi Emacs,
>>> It seems that running project-find-regexp fails over tramp.  Any idea?
>>> Thanks.
>> Hi!
>>
>> How does it fail? Does it signal an error? I don't see that in the
>> backtrace.
> It signals
> 
> --8<---------------cut here---------------start------------->8---
> split-string: Wrong type argument: stringp, nil
> --8<---------------cut here---------------end--------------->8---
> 
> The issue is that
> 
> --8<---------------cut here---------------start------------->8---
> (apply #'vc-git--run-command-string nil "ls-files" args)
> --8<---------------cut here---------------end--------------->8---
> 
> returns nil, in project--vc-list-files.
> 
> Does this help?  Thanks.

Okay... Does it happen on one particular host, or with any directory 
visited over Tramp?

I usually test Tramp functionality over the 'sudo' adapter.

E.g. /sudo:root@localhost:~/...





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25 11:25     ` Dmitry Gutov
@ 2022-08-25 12:36       ` Dmitry Gutov
  2022-08-25 16:24         ` André A. Gomes
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-25 12:36 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 57385

On 25.08.2022 14:25, Dmitry Gutov wrote:
> On 25.08.2022 09:57, André A. Gomes wrote:
>> Dmitry Gutov<dgutov@yandex.ru>  writes:
>>
>>> On 24.08.2022 18:17, André A. Gomes wrote:
>>>> Hi Emacs,
>>>> It seems that running project-find-regexp fails over tramp.  Any idea?
>>>> Thanks.
>>> Hi!
>>>
>>> How does it fail? Does it signal an error? I don't see that in the
>>> backtrace.
>> It signals
>>
>> --8<---------------cut here---------------start------------->8---
>> split-string: Wrong type argument: stringp, nil
>> --8<---------------cut here---------------end--------------->8---
>>
>> The issue is that
>>
>> --8<---------------cut here---------------start------------->8---
>> (apply #'vc-git--run-command-string nil "ls-files" args)
>> --8<---------------cut here---------------end--------------->8---
>>
>> returns nil, in project--vc-list-files.
>>
>> Does this help?  Thanks.
> 
> Okay... Does it happen on one particular host, or with any directory 
> visited over Tramp?
> 
> I usually test Tramp functionality over the 'sudo' adapter.
> 
> E.g. /sudo:root@localhost:~/...

BTW, is there any chance that you don't have Git installed on the remote 
host?





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25 12:36       ` Dmitry Gutov
@ 2022-08-25 16:24         ` André A. Gomes
  2022-08-25 17:44           ` Michael Albinus
  0 siblings, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-08-25 16:24 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 57385

Dmitry Gutov <dgutov@yandex.ru> writes:

>> Okay... Does it happen on one particular host, or with any directory
>> visited over Tramp?
>> I usually test Tramp functionality over the 'sudo' adapter.
>> E.g. /sudo:root@localhost:~/...
>
> BTW, is there any chance that you don't have Git installed on the remote
> host?

I have, but Tramp was not being able to find it.  I've solved that, but
now I'm stuck again...

--8<---------------cut here---------------start------------->8---
File is missing: /ssh:termux:/data/data/com.termux/files/home/repos/sbcl/.gitmodules
File is missing: Setting file times No such file or directory /data/data/com.termux/files/usr/tmp/tramp.sSmuQG
tramp-error: Setting file times No such file or directory /data/data/com.termux/files/usr/tmp/tramp.sSmuQG
--8<---------------cut here---------------end--------------->8---

It seems that Tramp isn't being able to read/write from the tmp
directory, but I can't figure out why.  Also, I don't get why it
complains about the fact that a git repository has no .gitmodules file.

Any idea?  Thanks again.


-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25 16:24         ` André A. Gomes
@ 2022-08-25 17:44           ` Michael Albinus
  2022-08-25 19:51             ` André A. Gomes
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Albinus @ 2022-08-25 17:44 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 57385, Dmitry Gutov

André A. Gomes <andremegafone@gmail.com> writes:

Hi André,

> I have, but Tramp was not being able to find it.  I've solved that, but
> now I'm stuck again...
>
> File is missing: /ssh:termux:/data/data/com.termux/files/home/repos/sbcl/.gitmodules
> File is missing: Setting file times No such file or directory /data/data/com.termux/files/usr/tmp/tramp.sSmuQG
> tramp-error: Setting file times No such file or directory /data/data/com.termux/files/usr/tmp/tramp.sSmuQG
>
> It seems that Tramp isn't being able to read/write from the tmp
> directory, but I can't figure out why.  Also, I don't get why it
> complains about the fact that a git repository has no .gitmodules file.

Looks like you use the termux sshd server on Android, right? This is
sometimes tricky; I'm discussing this configuration also in bug#57044.

Could you please try it again, starting with "emacs -Q" and making your
Tramp config manually, setting tramp-verbose to 10, and run the test?
The resulting debug buffer might tell us more.

> Any idea?  Thanks again.

Best regards, Michael.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25 17:44           ` Michael Albinus
@ 2022-08-25 19:51             ` André A. Gomes
  2022-08-26 14:32               ` Dmitry Gutov
  0 siblings, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-08-25 19:51 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 57385, Dmitry Gutov

Michael Albinus <michael.albinus@gmx.de> writes:

Hi Michael,

> Looks like you use the termux sshd server on Android, right? This is
> sometimes tricky; I'm discussing this configuration also in bug#57044.
>
> Could you please try it again, starting with "emacs -Q" and making your
> Tramp config manually, setting tramp-verbose to 10, and run the test?
> The resulting debug buffer might tell us more.

Indeed, termux sshd server on Android.  I'll investigate this further
and get back to you.

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?

Thanks again.


-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-25 19:51             ` André A. Gomes
@ 2022-08-26 14:32               ` Dmitry Gutov
  2022-08-26 15:08                 ` Michael Albinus
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-26 14:32 UTC (permalink / raw)
  To: André A. Gomes, Michael Albinus; +Cc: 57385

On 25.08.2022 22:51, André A. Gomes wrote:
> Michael Albinus<michael.albinus@gmx.de>  writes:
> 
> Hi Michael,
> 
>> Looks like you use the termux sshd server on Android, right? This is
>> sometimes tricky; I'm discussing this configuration also in bug#57044.
>>
>> Could you please try it again, starting with "emacs -Q" and making your
>> Tramp config manually, setting tramp-verbose to 10, and run the test?
>> The resulting debug buffer might tell us more.
> Indeed, termux sshd server on Android.  I'll investigate this further
> and get back to you.
> 
> 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?





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-26 14:32               ` Dmitry Gutov
@ 2022-08-26 15:08                 ` Michael Albinus
  2022-08-26 22:12                   ` Dmitry Gutov
  0 siblings, 1 reply; 17+ messages in thread
From: Michael Albinus @ 2022-08-26 15:08 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: André A. Gomes, 57385

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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-26 15:08                 ` Michael Albinus
@ 2022-08-26 22:12                   ` Dmitry Gutov
  2022-08-27  5:50                     ` Michael Albinus
  2022-09-11 15:22                     ` André A. Gomes
  0 siblings, 2 replies; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-26 22:12 UTC (permalink / raw)
  To: Michael Albinus; +Cc: André A. Gomes, 57385

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.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-26 22:12                   ` Dmitry Gutov
@ 2022-08-27  5:50                     ` Michael Albinus
  2022-08-27 10:45                       ` Dmitry Gutov
  2022-09-11 15:22                     ` André A. Gomes
  1 sibling, 1 reply; 17+ messages in thread
From: Michael Albinus @ 2022-08-27  5:50 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: André A. Gomes, 57385

Dmitry Gutov <dgutov@yandex.ru> writes:

Hi Dmitry,

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

In general, "/bin/sh" is a good idea. But André uses an Android device,
running termux. "/bin/sh" doesn't exist there. One can use
"/system/bin/sh" or "/data/data/com.termux/files/usr/bin/sh" (I believe,
haven't checked the latter).

Best regards, Michael.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-27  5:50                     ` Michael Albinus
@ 2022-08-27 10:45                       ` Dmitry Gutov
  0 siblings, 0 replies; 17+ messages in thread
From: Dmitry Gutov @ 2022-08-27 10:45 UTC (permalink / raw)
  To: Michael Albinus; +Cc: André A. Gomes, 57385

On 27.08.2022 08:50, Michael Albinus wrote:
> In general, "/bin/sh" is a good idea. But André uses an Android device,
> running termux. "/bin/sh" doesn't exist there. One can use
> "/system/bin/sh" or "/data/data/com.termux/files/usr/bin/sh" (I believe,
> haven't checked the latter).

Right, I suppose that would require customization.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-08-26 22:12                   ` Dmitry Gutov
  2022-08-27  5:50                     ` Michael Albinus
@ 2022-09-11 15:22                     ` André A. Gomes
  2022-09-11 21:46                       ` Dmitry Gutov
  1 sibling, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-09-11 15:22 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 57385, Michael Albinus

Dmitry Gutov <dgutov@yandex.ru> writes:

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

Dmitry, it works for me.  Thanks.

On which release will your patch be included?  Emacs 29 or Emacs 28.2?


-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-09-11 15:22                     ` André A. Gomes
@ 2022-09-11 21:46                       ` Dmitry Gutov
  2022-09-12  6:26                         ` André A. Gomes
  0 siblings, 1 reply; 17+ messages in thread
From: Dmitry Gutov @ 2022-09-11 21:46 UTC (permalink / raw)
  To: André A. Gomes; +Cc: 57385, Michael Albinus

On 11.09.2022 18:22, André A. Gomes wrote:
> On which release will your patch be included?  Emacs 29 or Emacs 28.2?

Emacs 29, but you will also be able to upgrade project.el separately, as 
soon as I bump the package version (from GNU ELPA).

...and I have done that now (version 1.5.1). Please wait up to 24h for 
the new version of the package to be released, and you can upgrade.





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-09-11 21:46                       ` Dmitry Gutov
@ 2022-09-12  6:26                         ` André A. Gomes
  2022-09-12  9:03                           ` Stefan Kangas
  0 siblings, 1 reply; 17+ messages in thread
From: André A. Gomes @ 2022-09-12  6:26 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 57385, Michael Albinus

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 11.09.2022 18:22, André A. Gomes wrote:
>> On which release will your patch be included?  Emacs 29 or Emacs 28.2?
>
> Emacs 29, but you will also be able to upgrade project.el separately, as
> soon as I bump the package version (from GNU ELPA).
>
> ...and I have done that now (version 1.5.1). Please wait up to 24h for
> the new version of the package to be released, and you can upgrade.

Thanks Dmitry.  Please instruct me on how to close this bug.


-- 
André A. Gomes
"You cannot even find the ruins..."





^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#57385: 28.1.91; project-find-regexp fails over tramp
  2022-09-12  6:26                         ` André A. Gomes
@ 2022-09-12  9:03                           ` Stefan Kangas
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Kangas @ 2022-09-12  9:03 UTC (permalink / raw)
  To: André A. Gomes, Dmitry Gutov; +Cc: 57385, Michael Albinus

close 57385 29.1
thanks

André A. Gomes <andremegafone@gmail.com> writes:

> Please instruct me on how to close this bug.

Now done.

For future reference, you can find the instructions here:
  https://debbugs.gnu.org/





^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-09-12  9:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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