Subject: Re: bug#68850: emacs: rgrep does not work over tramp

From: Tomas Volf <[email-masked]>
Date: Tue, 10 Dec 2024 17:12:56 +0100

Hello,

Simon Streit <[email-masked]> 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.