GNU bug report logs -
#79036
[PATCH] Fix pdb tracking for remote filenames
Previous Next
Full log
View this message in rfc822 format
> From: Liu Hui <liuhui1610 <at> gmail.com>
> Date: Thu, 17 Jul 2025 21:30:01 +0800
> Cc: michael.albinus <at> gmx.de, kobarity <at> gmail.com, 79036 <at> debbugs.gnu.org
>
> On Thu, Jul 17, 2025 at 8:09 PM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > My question was why cannot we simply call find-file-noselect
> > regardless of whether file-name is local or remote? And why do we
> > need all those checks with explicit calls to get-file-buffer etc.?
>
> I have provided an example:
>
> >>> from test import f; f()
> > /tmp/test.py(3)f()
> -> return 1
> (Pdb)
>
> Given above pdb output in the remote python shell, the file-name
> "/tmp/test.py" is local and find-file-noselect will simply open the
> local file. But the file is on the remote system.
Thanks, I see now.
So we need a function called, say, remote-file-name, which, when given
a file name, even an absolute one, will consider it to be on the
remote host indicated by default-directory, and will be equivalent to
expand-file-name if default-directory is a local one, is that right?
Michael, don't we already have such a function?
If we did have such a function, wouldn't it be enough to just call
(find-file-noselect (remote-file-name file-name))
? That is, we won't need to call get-file-buffer, nor file-exists-p,
right? Or am I still missing something?
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.