GNU bug report logs - #33255
27.0.50; expand-file-name: default directory expanded twice if relative

Previous Next

Package: emacs;

Reported by: immerrr again <immerrr <at> gmail.com>

Date: Sun, 4 Nov 2018 10:56:02 UTC

Severity: minor

Fixed in version 27.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 33255-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 33255-done <at> debbugs.gnu.org, immerrr again <immerrr <at> gmail.com>,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: 27.0.50; expand-file-name: default directory expanded twice if
 relative
Date: Tue, 13 Nov 2018 10:26:43 -0800
[Message part 1 (text/plain, inline)]
> I think a non-absolute HOME is a user error.
> Eg cd $HOME may then not be idempotent.
That's true. However, POSIX says that sh treats ~/foo like $HOME/foo 
even when HOME is not absolute, and it's better if Emacs is consistent 
with POSIX as much as possible within the Emacs constraint that 
expand-file-name must expand to an absolute file name. So I implemented 
something along the line of Noam's suggestion by installing the attached 
patch into master; this should fix the bug originally reported.

Unlike Noam's suggestion, this patch causes Emacs to look at the current 
value of HOME, not the value HOME had when Emacs started up, as that 
corresponds more closely to POSIX sh.

[0001-Act-like-POSIX-sh-if-HOME-is-relative.patch (text/x-patch, attachment)]

This bug report was last modified 6 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.