help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Retrieve values of variables in remote files


From: Michael Albinus
Subject: Re: Retrieve values of variables in remote files
Date: Tue, 10 Jan 2023 15:11:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

André A. Gomes <andremegafone@gmail.com> writes:

> Hi Michael,

Hi André,

> I understood why I'm confused, so I'll rephrase it.  Here's my tramp
> config:
>
> (dolist (path '("/run/setuid-programs"
>                 "/run/current-system/profile/bin"
>                 "/run/current-system/profile/sbin"
>                 "/data/data/com.termux/files/usr/bin"
>                 "/home/aadcg/.guix-profile/bin"
>                 "/home/aadcg/.guix-profile/sbin"))
>   (add-to-list 'tramp-remote-path path))
>
> (add-to-list 'tramp-remote-path 'tramp-own-remote-path)
>
> (dolist (prop '(("/ssh:termux:" "remote-shell" "sh")
>                 ("/ssh:termux:" "remote-path" 
> ("/data/data/com.termux/files/usr/bin"))
>                 ("/ssh:termux:" "tmpdir" 
> "/data/data/com.termux/files/usr/tmp")))
>   (add-to-list 'tramp-connection-properties prop))
>
>
> When I'm on a remote Termux buffer, evaluating
> (with-connection-local-variables temporary-file-directory) gives me
> "/tmp/", which is wrong.

`temporary-file-directory' isn't handled as connection-local-variable, so
it is always "/tmp".

> But when I run the command
> xref-matches-in-files on a remote buffer, I get the following in the
> *Messages* buffer:
>
> Copying /tmp/ppfrSh2Q4t to 
> /ssh:termux:/data/data/com.termux/files/usr/tmp/tramp.lT1BW5...done
>
>
> Which indicated me that Tramp is pointing to the right temp dir at
> Termux.  I don't understand what's happening here...  

Tramp DTRT :-)

It doesn't use the variable `temporary-file-directory', but the function
with the same name. What happens, if you eval (temporary-file-directory)
in a buffer with a remote default-directory?

> Thanks.

Best regards, Michael.



reply via email to

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