From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master 400df210ce0: Fix last change of 'delete-file' Date: Sat, 12 Aug 2023 13:03:20 +0200 Message-ID: <87r0o8r093.fsf@gmx.de> 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> <83h6p5hmex.fsf@gnu.org> <87350pu7qq.fsf@gmx.de> <834jl5hj9x.fsf@gnu.org> <87ttt5sd9y.fsf@gmx.de> <83y1ihfp41.fsf@gnu.org> <878ragshvk.fsf@gmx.de> <83h6p4eedt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14928"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: rpluim@gmail.com, emacs-devel@gnu.org, esr@thyrsus.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 12 13:04:07 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 1qUmPe-0003aD-Ct for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Aug 2023 13:04:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qUmP4-0004hr-Q3; Sat, 12 Aug 2023 07:03:30 -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 1qUmP3-0004hh-8k for emacs-devel@gnu.org; Sat, 12 Aug 2023 07:03:29 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qUmP1-000165-Ey; Sat, 12 Aug 2023 07:03:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1691838202; x=1692443002; i=michael.albinus@gmx.de; bh=wlALPIciT7M5Thx6PocUCgk7hpWP11PzwVI6AeSVDoY=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date; b=iaEyT5KD7eOKYim4jik/CUTS3ZsE2O68DbEmLPMEE0DbfNqEugwqkBgbUtji9TwW9SlLfHm eMI4aK4sG0OlRf9uhakioKtA68W7Q1M3Ze1Malwcf97+v8B4tXOcu1+nhnKAmUO1ihTemiviJ ag9MMFHv322Kl4omUowdAWPlJvMWjgh0Gy35/ey+eaWGZ386JjlOYlw47xsGu7bQQViEQ1QoY KejBhCnMNAMlcKmTUtEeA+6ls0FOi1Ju0VwOWwUuskePyez7xgvzOYSJSMinmj70X66GTSv0G j9r/qpb9oCHTXfUt60cP70Wn0bx1JALe5nz1gkQiv8n8Epfwaf/g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.39.27]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N5VHG-1pk5cR3yCw-016xtq; Sat, 12 Aug 2023 13:03:22 +0200 In-Reply-To: <83h6p4eedt.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Aug 2023 13:36:30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InO9wWEfyOG3b91ZHNvgasZAt Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:308615 Archived-At: Eli Zaretskii writes: Hi Eli, >> > But the situation now is bad already: if I call >> > file-name-as-directory, for example, with a relative file name in a >> > remote directory, the handler is not invoked. Isn't that a bug? >> >> Perhaps. But in practice, I'm not aware of bug reports about. > > It's a ticking time bomb. Perhaps. A ticking bomb for at least 34 years, when ange-ftp.el was added. >> However, we cannot call Fexpand_file_name in Ffind_file_name_handler, >> because expand-file-name supports also file name handlers. This would be >> an infloop. And just binding file-name-handler-alist to nil doesn't >> return the proper result, but a result which is similar only: > > We don't need to call expand-file-name in find-file-name-handler, > unless both the file name and default-directory are non-absolute. default-directory must be abso=C3=B6ute per spec. If somebody uses a relati= ve file name, and a relative default-directory by intention (let-bound, for example), I don't see a way to support file name handlers which need an absolute file name for check. I simply don't know how to expand a relative default-directory. >> --8<---------------cut here---------------start------------->8--- >> (let ((default-directory "/ssh::") >> file-name-handler-alist) >> (expand-file-name "123")) >> >> =3D> "c:/ssh::/123" >> --8<---------------cut here---------------end--------------->8--- > > Something to fix, I guess. I see no insoluble issues here, FWIW. We could use a variation of file-name-concat inside Ffind_file_name_handler, when FILENAME is relative. Best regards, Michael.