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: André A . Gomes
Subject: Re: Retrieve values of variables in remote files
Date: Tue, 10 Jan 2023 14:39:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Michael,

Thank you for the reply.

I understood why I'm confused, so I'll rephrase it.  Here's my tramp
config:

--8<---------------cut here---------------start------------->8---
(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))
--8<---------------cut here---------------end--------------->8---

When I'm on a remote Termux buffer, evaluating
(with-connection-local-variables temporary-file-directory) gives me
"/tmp/", which is wrong.  But when I run the command
xref-matches-in-files on a remote buffer, I get the following in the
*Messages* buffer:

--8<---------------cut here---------------start------------->8---
Copying /tmp/ppfrSh2Q4t to 
/ssh:termux:/data/data/com.termux/files/usr/tmp/tramp.lT1BW5...done
--8<---------------cut here---------------end--------------->8---

Which indicated me that Tramp is pointing to the right temp dir at
Termux.  I don't understand what's happening here...  

> What is the value of variables connection-local-criteria-alist,
> connection-local-profile-alist and connection-local-variables-alist,
> evaluated in the respective buffer?

Respectively:

--8<---------------cut here---------------start------------->8---
(((:application tramp :protocol "adb")
tramp-adb-connection-local-default-shell-profile
tramp-adb-connection-local-default-ps-profile) ((:application tramp)
tramp-connection-local-default-system-profile
tramp-connection-local-default-shell-profile))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
(((:application tramp :protocol "adb")
tramp-adb-connection-local-default-shell-profile
tramp-adb-connection-local-default-ps-profile) ((:application tramp)
tramp-connection-local-default-system-profile
tramp-connection-local-default-shell-profile))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
nil
--8<---------------cut here---------------end--------------->8---

> Btw, which Emacs version / Tramp version are you using?

Emacs version 28.2, tramp version 2.6.0.

Thanks.


-- 
André A. Gomes
"You cannot even find the ruins..."



reply via email to

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