Christopher Allan Webber writes:

> I'm also not sure it will find the right paths if your username is
> different on the remote host, and some of the binaries it's looking for
> are in your user's profile there?

Well, I just found in the `tramp-remote-path' docs:

  You can use ‘~’ in this list, but when searching for a shell which groks
  tilde expansion, all directory names starting with ‘~’ will be ignored.

Given that, I've updated the code I'm using to:

#+BEGIN_SRC emacs-lisp
  ;; Make sure we work on remote guixsd machines :)
  ;; probably only helps if you start on a guixsd machine..!
  (setq tramp-remote-path
        (append tramp-remote-path
                '(tramp-own-remote-path
                  "~/.guix-profile/bin" "~/.guix-profile/sbin")))
#+END_SRC

But maybe the best option would be:

#+BEGIN_SRC emacs-lisp
  ;; Make sure we work on remote guixsd machines :)
  ;; probably only helps if you start on a guixsd machine..!
  (setq tramp-remote-path
        (append tramp-remote-path
                '("~/.guix-profile/bin" "~/.guix-profile/sbin"
                  "/run/current-system/profile/bin" 
"/run/current-system/profile/sbin")))
#+END_SRC

That seems like the best general case route?  We could keep
tramp-own-remote-path in there too, I guess?

Reply via email to