GNU bug report logs - #68850
emacs: rgrep does not work over tramp

Previous Next

Package: guix;

Reported by: Tomas Volf <~@wolfsden.cz>

Date: Wed, 31 Jan 2024 13:09:02 UTC

Severity: normal

To reply to this bug, email your comments to 68850 AT debbugs.gnu.org.

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-guix <at> gnu.org:
bug#68850; Package guix. (Wed, 31 Jan 2024 13:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tomas Volf <~@wolfsden.cz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 31 Jan 2024 13:09:02 GMT) Full text and rfc822 format available.

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

From: Tomas Volf <~@wolfsden.cz>
To: bug-guix <at> gnu.org
Subject: emacs: rgrep does not work over tramp
Date: Wed, 31 Jan 2024 14:08:17 +0100
[Message part 1 (text/plain, inline)]
Hello,

when I try to execute rgrep over a tramp connection, I get the following error:

/bin/sh: /gnu/store/sk8rxsrj3drr4arypicnhy899vgn3prr-findutils-4.9.0/bin/find: not found

That is somewhat expected, since the remote machine is not a Guix one, but even
if it were, it would require to have the find in exact same store path.

I understand the advantages of baking in the path to find into the
configuration, but I wonder whether the trade-off is worth if for this
particular case.  Setting it to just `find' seems to work fine, both locally and
remotely (at the cost of a minuscule hit to reproducibility).

Have a nice day,
Tomas Volf

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#68850; Package guix. (Tue, 10 Dec 2024 15:06:01 GMT) Full text and rfc822 format available.

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

From: Simon Streit <simon <at> netpanic.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 68850 <at> debbugs.gnu.org
Subject: Re: bug#68850: emacs: rgrep does not work over tramp
Date: Tue, 10 Dec 2024 16:05:31 +0100
Hello Tomas,

Tomas Volf <~@wolfsden.cz> writes:

> when I try to execute rgrep over a tramp connection, I get the following error:
>
> /bin/sh: /gnu/store/sk8rxsrj3drr4arypicnhy899vgn3prr-findutils-4.9.0/bin/find: not found
>
> That is somewhat expected, since the remote machine is not a Guix one,
> but even if it were, it would require to have the find in exact same
> store path.

I am running into the same issue as well.  This is on a foreign system
using Emacs and Tramp trying to call find on remote hosts that are not
Guix.

> I understand the advantages of baking in the path to find into the
> configuration, but I wonder whether the trade-off is worth if for this
> particular case.  Setting it to just `find' seems to work fine, both
> locally and remotely (at the cost of a minuscule hit to
> reproducibility).

Is there maybe an easy way around this?  I tried:

--8<---------------cut here---------------start------------->8---
(connection-local-set-profile-variables
 'remote-system
 '((tramp-remote-path . ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin"))))
(connection-local-set-profiles
 '(:application tramp :machine "host.example.com")
 'remote-system)
--8<---------------cut here---------------end--------------->8---

The connection will set the remote-path.  But rgrep will still invoke
find from a path in /gnu/store.


Cheers

-- 
Simon




Information forwarded to bug-guix <at> gnu.org:
bug#68850; Package guix. (Tue, 10 Dec 2024 16:14:02 GMT) Full text and rfc822 format available.

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

From: Tomas Volf <~@wolfsden.cz>
To: Simon Streit <simon <at> netpanic.org>
Cc: 68850 <at> debbugs.gnu.org
Subject: Re: bug#68850: emacs: rgrep does not work over tramp
Date: Tue, 10 Dec 2024 17:12:56 +0100
[Message part 1 (text/plain, inline)]
Hello,

Simon Streit <simon <at> netpanic.org> writes:

> Is there maybe an easy way around this?  I tried:
>
> (connection-local-set-profile-variables
>  'remote-system
>  '((tramp-remote-path . ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin" "/usr/local/sbin" "/local/bin"))))
> (connection-local-set-profiles
>  '(:application tramp :machine "host.example.com")
>  'remote-system)
>
> The connection will set the remote-path.  But rgrep will still invoke
> find from a path in /gnu/store.

Customizing `find-program' to just "find" and restarting Emacs does the
trick.  So just sticking

    (setopt find-program "find")

into `init.el' should work.

I played with it around for a bit but did not figure out how to
customize it in already running Emacs.  I am sure it is possible, but I
hit the self-imposed time limit before figuring it out.

Have a nice day,
Tomas

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#68850; Package guix. (Tue, 10 Dec 2024 20:03:01 GMT) Full text and rfc822 format available.

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

From: Simon Streit <simon <at> netpanic.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 68850 <at> debbugs.gnu.org
Subject: Re: bug#68850: emacs: rgrep does not work over tramp
Date: Tue, 10 Dec 2024 21:02:35 +0100
Thank you for your quick reply!

Tomas Volf <~@wolfsden.cz> writes:

> Customizing `find-program' to just "find" and restarting Emacs does the
> trick.  So just sticking
>
>     (setopt find-program "find")
>
> into `init.el' should work.
>
> I played with it around for a bit but did not figure out how to
> customize it in already running Emacs.  I am sure it is possible, but I
> hit the self-imposed time limit before figuring it out.

Setting this variable fixes it and happily applied it locally.

I also get your point now too.  The path has been hard-coded at build
time.  Looking into the package declaration, it is not the only one
being modified.  This modification may seem reasonable when working
within an environment of Guix.  But it can become a disadvantage
when working on hosts that are sans Guix.

Also, how can this path to an application within the store work on a
remote system – that may also have a Guix store – when it does not
exist?  My guess here is, that tramp will call the application on remote
host it is working on.  Then it should also expect that path on the
remote store to exist too.

I can't deny that my Guix systems are not that much different to each
other.  They usually tend to have similar states of stores.  I can test
a scenario with an empty near clean store.


Kind regards

-- 
Simon




This bug report was last modified 283 days ago.

Previous Next


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