From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: master 400df210ce0: Fix last change of 'delete-file' Date: Fri, 11 Aug 2023 14:02:30 +0300 Message-ID: <83h6p5hmex.fsf@gnu.org> References: <169133064669.24990.11219399079845613336@vcs2.savannah.gnu.org> <20230806140407.09E6BC038BE@vcs2.savannah.gnu.org> <875y5n6nz2.fsf@gmail.com> <83o7jfhvw3.fsf@gnu.org> <871qgb6mg9.fsf@gmail.com> <83h6p7hueg.fsf@gnu.org> <87wmy355aa.fsf@gmail.com> <83cyzvhri7.fsf@gnu.org> <87msyyt4ne.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7651"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, emacs-devel@gnu.org, esr@thyrsus.com To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 11 13:03:18 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qUPvK-0001kN-As for ged-emacs-devel@m.gmane-mx.org; Fri, 11 Aug 2023 13:03:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUPue-0008Lr-0m; Fri, 11 Aug 2023 07:02:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUPuQ-0008JQ-6Y for emacs-devel@gnu.org; Fri, 11 Aug 2023 07:02:23 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUPuD-0005ro-7R; Fri, 11 Aug 2023 07:02:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/Mnp1ZRzPBJlqJZESPxq94+LChFhbaT0uDF60V+l7AY=; b=b0v7T/QHLDLo+Ls3SinU FMDvAQwGH9Fssxa/FH4i1czJu4Mfe3nkhhUirOitNp8ccec36fT0fZKQYP9cVkaJXoWJh+uTbLYPo tiZZLryLPX2zc+vc7/8JP7cQSQ3uDlx7CvXg+iYmF4fcMixRCsCpLxyALgwrCh3tInO2zfTD6xS6b 7MeZH71OosCABeRNMpKXSou4A91pVxHIkb4Nx0ZiChaU0IfPWsHS8GlS+/svmu+NGqM2w0W4TvlOm 8smlUVA8eBHk8NEFLUsSGj/u7IbQiWFc8N0rHXCnd2tQoXLJZoxbl/J8bRFR5qRgE5GPdx5LLX9G0 BPFglDhALYm2rw==; In-Reply-To: <87msyyt4ne.fsf@gmx.de> (message from Michael Albinus on Fri, 11 Aug 2023 09:33:09 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:308569 Archived-At: > From: Michael Albinus > Cc: Robert Pluim , emacs-devel@gnu.org, Eric S. Raymond > > Date: Fri, 11 Aug 2023 09:33:09 +0200 > > Eli Zaretskii 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.