GNU bug report logs - #27982
25.1.50; expand-file-name docstring on how to traverse the filesystem

Previous Next

Package: emacs;

Reported by: Nicolas Richard <youngfrog <at> members.fsf.org>

Date: Sun, 6 Aug 2017 11:39:01 UTC

Severity: minor

Found in version 25.1.50

Done: Nicolas Richard <youngfrog <at> members.fsf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Richard <youngfrog <at> members.fsf.org>
Cc: 27982 <at> debbugs.gnu.org
Subject: bug#27982: 25.1.50; expand-file-name docstring on how to traverse the filesystem
Date: Wed, 23 Aug 2017 20:50:29 +0300
> From: Nicolas Richard <youngfrog <at> members.fsf.org>
> Cc: 27982 <at> debbugs.gnu.org
> Date: Wed, 23 Aug 2017 14:18:24 +0200
> 
> (let ((dirname current-directory))
>    (format "%s versus %s"
>       (directory-file-name (file-name-directory dirname))
>       (expand-file-name ".." dirname)))
> => "/home/youngfrog versus /home"
> => Effect is clearly different.

Crystal ball says that current-directory (which you probably meant to
be default-directory instead) ends in a slash, in which case remove
it, and the 2 results will match.




This bug report was last modified 7 years and 266 days ago.

Previous Next


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