GNU bug report logs - #57385
28.1.91; project-find-regexp fails over tramp

Previous Next

Package: emacs;

Reported by: André A. Gomes <andremegafone <at> gmail.com>

Date: Wed, 24 Aug 2022 15:19:01 UTC

Severity: normal

Found in version 28.1.91

Fixed in version 29.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57385 in the body.
You can then email your comments to 57385 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Wed, 24 Aug 2022 15:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to André A. Gomes <andremegafone <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 24 Aug 2022 15:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1.91; project-find-regexp fails over tramp
Date: Wed, 24 Aug 2022 18:17:51 +0300
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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Wed, 24 Aug 2022 18:12:02 GMT) Full text and rfc822 format available.

Message #8 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: André A. Gomes <andremegafone <at> gmail.com>,
 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Wed, 24 Aug 2022 21:11:32 +0300
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))
> 


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 06:58:02 GMT) Full text and rfc822 format available.

Message #11 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 09:57:07 +0300
Dmitry Gutov <dgutov <at> 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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 11:26:01 GMT) Full text and rfc822 format available.

Message #14 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: André A. Gomes <andremegafone <at> gmail.com>
Cc: 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 14:25:03 +0300
On 25.08.2022 09:57, André A. Gomes wrote:
> Dmitry Gutov<dgutov <at> 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 <at> localhost:~/...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 12:37:02 GMT) Full text and rfc822 format available.

Message #17 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: André A. Gomes <andremegafone <at> gmail.com>
Cc: 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 15:36:42 +0300
On 25.08.2022 14:25, Dmitry Gutov wrote:
> On 25.08.2022 09:57, André A. Gomes wrote:
>> Dmitry Gutov<dgutov <at> 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 <at> localhost:~/...

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 16:25:01 GMT) Full text and rfc822 format available.

Message #20 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 19:24:43 +0300
Dmitry Gutov <dgutov <at> 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 <at> 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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 17:45:01 GMT) Full text and rfc822 format available.

Message #23 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: André A. Gomes <andremegafone <at> gmail.com>
Cc: 57385 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 19:44:02 +0200
André A. Gomes <andremegafone <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Thu, 25 Aug 2022 19:53:01 GMT) Full text and rfc822 format available.

Message #26 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 57385 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Thu, 25 Aug 2022 22:51:58 +0300
Michael Albinus <michael.albinus <at> 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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Fri, 26 Aug 2022 14:33:02 GMT) Full text and rfc822 format available.

Message #29 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: André A. Gomes <andremegafone <at> gmail.com>,
 Michael Albinus <michael.albinus <at> gmx.de>
Cc: 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Fri, 26 Aug 2022 17:32:08 +0300
On 25.08.2022 22:51, André A. Gomes wrote:
> Michael Albinus<michael.albinus <at> 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?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Fri, 26 Aug 2022 15:09:01 GMT) Full text and rfc822 format available.

Message #32 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: "André A. Gomes" <andremegafone <at> gmail.com>,
 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Fri, 26 Aug 2022 17:08:39 +0200
Dmitry Gutov <dgutov <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Fri, 26 Aug 2022 22:13:02 GMT) Full text and rfc822 format available.

Message #35 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: André A. Gomes <andremegafone <at> gmail.com>,
 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sat, 27 Aug 2022 01:12:37 +0300
On 26.08.2022 18:08, Michael Albinus wrote:
> Dmitry Gutov <dgutov <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Sat, 27 Aug 2022 05:51:02 GMT) Full text and rfc822 format available.

Message #38 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: "André A. Gomes" <andremegafone <at> gmail.com>,
 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sat, 27 Aug 2022 07:50:14 +0200
Dmitry Gutov <dgutov <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Sat, 27 Aug 2022 10:46:02 GMT) Full text and rfc822 format available.

Message #41 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: André A. Gomes <andremegafone <at> gmail.com>,
 57385 <at> debbugs.gnu.org
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sat, 27 Aug 2022 13:45:28 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Sun, 11 Sep 2022 15:24:02 GMT) Full text and rfc822 format available.

Message #44 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 57385 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Sun, 11 Sep 2022 18:22:57 +0300
Dmitry Gutov <dgutov <at> 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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Sun, 11 Sep 2022 21:48:02 GMT) Full text and rfc822 format available.

Message #47 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: André A. Gomes <andremegafone <at> gmail.com>
Cc: 57385 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Mon, 12 Sep 2022 00:46:51 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Mon, 12 Sep 2022 06:27:02 GMT) Full text and rfc822 format available.

Message #50 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: André A. Gomes <andremegafone <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 57385 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Mon, 12 Sep 2022 09:26:27 +0300
Dmitry Gutov <dgutov <at> 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..."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#57385; Package emacs. (Mon, 12 Sep 2022 09:04:01 GMT) Full text and rfc822 format available.

Message #53 received at 57385 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: André A. Gomes <andremegafone <at> gmail.com>, 
 Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 57385 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: Re: bug#57385: 28.1.91; project-find-regexp fails over tramp
Date: Mon, 12 Sep 2022 05:03:15 -0400
close 57385 29.1
thanks

André A. Gomes <andremegafone <at> 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/




bug marked as fixed in version 29.1, send any further explanations to 57385 <at> debbugs.gnu.org and André A. Gomes <andremegafone <at> gmail.com> Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 12 Sep 2022 09:04:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Oct 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.