From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: 900276502f..: Paul Eggert 2018-11-13 Act like POSIX sh if $HOME is relative Date: Wed, 12 Dec 2018 16:14:25 +0100 Message-ID: <877egerd4e.fsf@telefonica.net> References: <87ftv2ri0s.fsf@telefonica.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1544627593 23964 195.159.176.226 (12 Dec 2018 15:13:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2018 15:13:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 12 16:13:09 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gX6CB-00063t-7m for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2018 16:13:07 +0100 Original-Received: from localhost ([::1]:45518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6EH-0004hl-PL for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2018 10:15:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gX6De-0004hU-Pr for emacs-devel@gnu.org; Wed, 12 Dec 2018 10:14:39 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gX6Db-0000Ta-Mj for emacs-devel@gnu.org; Wed, 12 Dec 2018 10:14:38 -0500 Original-Received: from [195.159.176.226] (port=40470 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gX6Db-0000Rz-FN for emacs-devel@gnu.org; Wed, 12 Dec 2018 10:14:35 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gX6BR-000584-5T for emacs-devel@gnu.org; Wed, 12 Dec 2018 16:12:21 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:+Sj+vWezx8Nbhz3dfc7VzOBAJoA= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231780 Archived-At: João Távora writes: > On Wed, Dec 12, 2018 at 1:41 PM Óscar Fuentes wrote: > >> "João Távora" writes: >> >> > I've only now caught up with the discussion of bug#33255. Are the >> > consequences of interpreting the string "c:" on Windows as a relative >> > file name understood? >> > >> > With HOME="z:", it used to be that (expand-file-name "~/blabla") >> > returned "z:/blabla" but now it returns >> > "z:/source/emacs/emacs/src/z:/blabla", which is not a valid Windows >> > pathname. >> >> [snip] >> >> I was about to post a reply but Yuri already answered, so I'll only add >> a pointer to an official reference about this topic: >> >> https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats >> > > Óscar, I get it that z:bla has a meaning. But is this meaning ever useful > when for expanding "~/bla"? > > I didn't say the change was "wrong". I just asked, basically: > > * if anyone had contemplated this particular problem on Windows; > * if it's possible to interpret HOME specially for this particular bit of > backward compatibility without breaking the cases of bug#33255 I don't know about the motivation of this change and have no time to study it (a cursory look at the diff shows some concerning points wrt Windows compatibility such as hope one's home directory doesn't contain ':' or '%'. */ ). A Windows path with no slash after the volume letter is relative and always was. For the specific case of HOME, I can't think of a sane scenario where a user could take advantage of interpreting V: as a relative path for HOME on Emacs, but maybe I'm not being imaginative enough. You are asking for being bug-compatible with previous Emacs because you must cope with bugs on other applications :-) Do you think that this problem is frequent enough? What applications are those that don't admit an slash after the volume letter in HOME?