GNU bug report logs -
#79036
[PATCH] Fix pdb tracking for remote filenames
Previous Next
Full log
Message #110 received at 79036 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jul 22, 2025 at 12:01 AM kobarity <kobarity <at> gmail.com> wrote:
> The case of multiple remote hosts should also be considered. In
> summary, it seems to me that it would be a good idea to pass the file
> names as shown in the following table.
>
> | | Local Python | Python on remote1 |
> |-------------------+---------------------+---------------------|
> | Local tmp.py | tmp.py | /ssh::tmp.py |
> | tmp.py on remote1 | /ssh:remote1:tmp.py | tmp.py |
> | tmp.py on remote2 | /ssh:remote2:tmp.py | /ssh:remote2:tmp.py |
>
> Local Python cases are already covered with current python.el.
> Attached is a PoC-level patch to support Remote Python cases.
>
> What do you think of this approach?
Hi,
I think it is better since it explicitly identifies the source of
code. Then there is no confusion and file-exists-p is not needed in
python-pdbtrack-set-tracked-buffer.
> +(defun python-shell--file-name-to-send (process)
> + "Return the file name to send to inferior Python PROCESS."
> + (let ((file-name (buffer-file-name))
> + (process-prefix
> + (file-remote-p
> + (with-current-buffer (process-buffer process) default-directory))))
> + (if file-name
> + (if process-prefix
> + (let ((remote-p (file-remote-p file-name))
> + (local-name (file-local-name file-name)))
> + (if remote-p
> + (if (string= remote-p process-prefix)
> + local-name
> + file-name)
> + (concat python-shell-local-prefix local-name)))
> + file-name)
> + "<string>")))
For non-file buffers, could it return buffer name instead of <string>?
e.g. #<buffer NAME> or #<NAME> where NAME may need to be quoted. Then
python-pdbtrack-set-tracked-buffer can find it by (get-buffer-create
"NAME").
This bug report was last modified 1 day ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.