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: Sun, 06 Aug 2017 19:53:57 +0300
> From: Nicolas Richard <youngfrog <at> members.fsf.org>
> Date: Sun, 06 Aug 2017 13:38:32 +0200
> 
> The docstring of expand-file-name suggest
> (directory-file-name (file-name-directory dirname))
> to traverse a directory

No, it only suggests that as a more reliable alternative to

  (expand-file-name ".." dirname)

> This looks wrong to me, e.g.
> (list current-directory
>       (directory-file-name (file-name-directory current-directory)))
>  => ("/home/youngfrog/" "/home/youngfrog")

This is not the use case against which the doc string tries to warn,

Thanks.




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

Previous Next


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