1

I'm trying to configure a remote path when using tramp. I have added (add-to-list 'tramp-remote-path "/root/.cargo/bin") to my init.el

I get the following error: Symbol's value as variable is void: tramp-remote-path

The tramp docs suggest this is the correct pattern: https://www.gnu.org/software/emacs/manual/html_node/tramp/Remote-programs.html

tramp-version is 2.4.3.27.1

Emacs version is: GNU Emacs 27.1 (build 1, aarch64-apple-darwin20.3.0, NS appkit-2022.30 Version 11.2.1 (Build 20D74)) of 2021-03-07

I can do apropos-user-option tramp-remote-path and find it in the configuration options.

kevzettler
  • 327
  • 2
  • 13
  • 2
    You have a typo in your config, use something like `(add-to-list 'tramp-remote-path "/root/.cargo/bin)`. If the typo is in the post, then you can modify `tramp-remote-path` nested in `(with-eval-after-load "tramp" (add-to-list 'tramp-remote-path "/root/.cargo/bin"))`. – Swarnendu Biswas Nov 12 '21 at 17:10
  • Does this answer your question? [What's the difference between push and add-to-list?](https://emacs.stackexchange.com/questions/7389/whats-the-difference-between-push-and-add-to-list) – Drew Nov 12 '21 at 17:29
  • You can also search for tag `[quote]`, to find various questions that amount to the same thing: not quoting an arg value that needs to be quoted. In this case, `C-h f add-to-list` is your friend, telling you that it's a function (functions eval their args), and it needs a symbol that's a variable (with a list value) as its first arg. – Drew Nov 12 '21 at 17:31
  • 1
    Does this answer your question? [Wrong type argument: symbolp, 10](https://emacs.stackexchange.com/questions/57892/wrong-type-argument-symbolp-10) – NickD Nov 14 '21 at 16:49
  • 1
    Same issue here. Swarnendu's sugestion of wrapping it with-eval-after-load resolved the issue for me. – Digicrat Jan 20 '22 at 20:07

0 Answers0