[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 400df210ce0: Fix last change of 'delete-file'
From: |
Eli Zaretskii |
Subject: |
Re: master 400df210ce0: Fix last change of 'delete-file' |
Date: |
Fri, 11 Aug 2023 14:02:30 +0300 |
> From: Michael Albinus <michael.albinus@gmx.de>
> Cc: Robert Pluim <rpluim@gmail.com>, emacs-devel@gnu.org, Eric S. Raymond
> <esr@thyrsus.com>
> Date: Fri, 11 Aug 2023 09:33:09 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >>
> >> (delete-file "foo.txt") when `default-directory' is "/var" would
> >> previously result in `my-file-handler' being called. Now itʼs not
> >> called at all, and the deletion is handled by `delete-file-internal'
> >
> > But the same would be true for substitute-in-file-name, for example,
> > and for directory-file-name, and file-name-as-directory, and several
> > other primitives, which call Ffind_file_name_handler without calling
> > expand-file-name before that.
> >
> > But maybe I'm missing something here, so let's ask Michael (CC'ed) for
> > his opinion on this.
>
> In Emacs 29, we have in Fdelete_file:
>
> --8<---------------cut here---------------start------------->8---
> filename = Fexpand_file_name (filename, Qnil);
>
> handler = Ffind_file_name_handler (filename, Qdelete_file);
> if (!NILP (handler))
> return call3 (handler, Qdelete_file, filename, trash);
> --8<---------------cut here---------------end--------------->8---
>
> So the file name is always absolute. Now in Emacs 30, the file name is
> not expanded prior calling find-file-name-handler in delete-file. That
> is an error in the transition from C to Lisp.
>
> Cc to Eric, who has done the transition.
Oops, sorry, I failed to see that this was from Michael.
Michael, this is my change, not Eric's. My question is above: is
there a requirement that file handlers are called with absolute file
names? If so, where is it documented, and why some places, which I
mentioned above, call file handlers with file names that were not
passed through expand-file-name?
You just say this is an error, but don't answer my questions about
this.
- Re: master 400df210ce0: Fix last change of 'delete-file', Robert Pluim, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Robert Pluim, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Robert Pluim, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/10
- Re: master 400df210ce0: Fix last change of 'delete-file', Michael Albinus, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file',
Eli Zaretskii <=
- Re: master 400df210ce0: Fix last change of 'delete-file', Michael Albinus, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file', Michael Albinus, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/11
- Re: master 400df210ce0: Fix last change of 'delete-file', Michael Albinus, 2023/08/12
- Re: master 400df210ce0: Fix last change of 'delete-file', Eli Zaretskii, 2023/08/12
- Re: master 400df210ce0: Fix last change of 'delete-file', Michael Albinus, 2023/08/12