guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs tramp in remote guix


From: Josselin Poiret
Subject: Re: emacs tramp in remote guix
Date: Sat, 12 Feb 2022 12:30:11 +0100

Hello everyone,

Mikhail Kryshen <mikhail@kryshen.net> writes:

> Hello,
>
> Antonio Carlos Padoan Junior <acpadoanjr@yahoo.com.br> writes:
>
>> Hello everybody,
>>
>> I'm trying to use emacs tramp to connect to a guix machine but tramp
>> complains it can't find an appropriate 'ls' command.
>>
>> I tried to help tramp setting the following:
>>   (add-to-list 'tramp-remote-path "/run/current-system/profile/bin")
>
> For me this works.
>
>> But I'm still not lucky. I always get the same error.  Is there any
>> elegant way to correctly use tramp with a remote guix machine?
>
> You may need to delete ~/.emacs.d/tramp before starting Emacs for the
> setting to take effect.

I personally use
--8<---------------cut here---------------start------------->8---
  (require 'tramp)
  (connection-local-set-profile-variables
   'guix-system
   '((tramp-remote-path . (tramp-own-remote-path))))
  (connection-local-set-profiles
   '(:application tramp :protocol "sudo" :machine "hostname")
   'guix-system)
--8<---------------cut here---------------end--------------->8---
for tramp on my own machine.  The symbol 'tramp-own-remote-path uses the
login shell of the target to determine the environment to use, so is
well suited for guix.  You may need to adjust the :protocol and :machine
keys of the connection-local-set-profiles call for your use case though.

Best,
-- 
Josselin Poiret



reply via email to

[Prev in Thread] Current Thread [Next in Thread]