From: Nicolas Richard <youngfrog@members.fsf.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27982@debbugs.gnu.org
Subject: bug#27982: 25.1.50; expand-file-name docstring on how to traverse the filesystem
Date: Wed, 23 Aug 2017 14:18:24 +0200 [thread overview]
Message-ID: <86bmn6o4tr.fsf@members.fsf.org> (raw)
In-Reply-To: <83r2wotz6i.fsf@gnu.org>
Hello,
Thanks for your comment.
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Nicolas Richard <youngfrog@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)
If it's an alternative, shouldn't it have an equivalent effect, except
for cases where it's better? Or perhaps my english is lacking and I
misunderstand the suggestion completely.
Let me rephrase my example just to make sure I explained myself
correctly:
(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.
With my suggestion this would become:
(let ((dirname current-directory))
(format "%s versus %s"
(file-name-directory (directory-file-name dirname))
(expand-file-name ".." dirname)))
=> "/home/ versus /home"
=> Effect is somewhat similar
Nicolas.
next prev parent reply other threads:[~2017-08-23 12:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-06 11:38 bug#27982: 25.1.50; expand-file-name docstring on how to traverse the filesystem Nicolas Richard
2017-08-06 16:53 ` Eli Zaretskii
2017-08-23 12:18 ` Nicolas Richard [this message]
2017-08-23 17:50 ` Eli Zaretskii
2017-08-23 19:18 ` Nicolas Richard
2017-08-24 17:08 ` Eli Zaretskii
2017-08-30 15:43 ` Nicolas Richard
2017-09-02 9:59 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bmn6o4tr.fsf@members.fsf.org \
--to=youngfrog@members.fsf.org \
--cc=27982@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.