unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: rpluim@gmail.com, emacs-devel@gnu.org, esr@thyrsus.com
Subject: Re: master 400df210ce0: Fix last change of 'delete-file'
Date: Fri, 11 Aug 2023 14:02:30 +0300	[thread overview]
Message-ID: <83h6p5hmex.fsf@gnu.org> (raw)
In-Reply-To: <87msyyt4ne.fsf@gmx.de> (message from Michael Albinus on Fri, 11 Aug 2023 09:33:09 +0200)

> 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.



  parent reply	other threads:[~2023-08-11 11:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169133064669.24990.11219399079845613336@vcs2.savannah.gnu.org>
     [not found] ` <20230806140407.09E6BC038BE@vcs2.savannah.gnu.org>
2023-08-10 13:12   ` master 400df210ce0: Fix last change of 'delete-file' Robert Pluim
2023-08-10 13:25     ` Eli Zaretskii
2023-08-10 13:44       ` Robert Pluim
2023-08-10 13:57         ` Eli Zaretskii
2023-08-10 14:41           ` Robert Pluim
2023-08-10 15:00             ` Eli Zaretskii
2023-08-11  7:33               ` Michael Albinus
2023-08-11 10:59                 ` Eli Zaretskii
2023-08-11 11:02                 ` Eli Zaretskii [this message]
2023-08-11 11:41                   ` Michael Albinus
2023-08-11 12:10                     ` Eli Zaretskii
2023-08-11 17:24                       ` Michael Albinus
2023-08-11 17:47                         ` Eli Zaretskii
2023-08-12  9:57                           ` Michael Albinus
2023-08-12 10:36                             ` Eli Zaretskii
2023-08-12 11:03                               ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h6p5hmex.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esr@thyrsus.com \
    --cc=michael.albinus@gmx.de \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).