From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: bug-gnu-emacs@gnu.org, 4654@emacsbugs.donarmstrong.com
Subject: bug#4654: 23.1; Elisp manual doc of abbreviate-file-name
Date: Tue, 6 Oct 2009 14:12:51 -0700 [thread overview]
Message-ID: <2C5117E03B57417289F8B3E16B1B8B61@us.oracle.com> (raw)
In-Reply-To: <jwvpr90e0mj.fsf-monnier+emacsbugreports@gnu.org>
> > Question: Why? What is the rationale for not substituting
> > `~' when it is a root directory? If the reason is short to
> > express, perhaps it should be included in the doc.
> > Understanding the rationale helps one remember what the
> > function does.
>
> "a root directory" means "/". The reason is that substituting "/" for
> "~" doesn't really abbreviate anything. If anythingn to me it "looks"
> longer because I expect ~ to expand to something longer.
1. Don't tell me; put it in the doc., please. ;-) That's the point of the bug
report.
I would add that the doc could be a tiny bit clearer that the expanded form of
the home dir is replaced by ~, and not vice versa.
The current phrasing ("substitutes "~" for the user's home directory") is
correct, but many people routinely misread such phrases. (You yourself just made
this mistake, for example: You said "substituting / for ~", when you presumably
meant "substituting ~ for /".)
In particular, it is not uncommon for people to incorrectly substitute "replace"
for "substitute". Using "replace" here (and reversing the order) is likely to be
a bit clearer. Clarity would be enhanced further by adding a simple example.
2. FWIW, I don't have a set opinion on this, but I lean toward saying that this
exception for a root homedir should in fact be removed. Why? Because `~' lets
you know that it _is_ the home directory.
~/foo/ tells you that foo is directly under the home directory.
On the other hand, /foo/ tells you that foo is directly under the root, which
~/foo/ does not tell you. This goes along with what you were saying about
expecting ~ to expand to something longer. ~ tells you that you are at the home
dir, but it doesn't tell you where that is.
Each side thus has a legitimate argument that additional info is provided. But
it's not a toss-up, since the _purpose_ of the function is to use ~. That, and
also the elimination of a shaky exception (Occam's razor), is why I lean toward
always using ~, even for a root homedir.
Finally, the one-char length difference argument should be irrelevant here. And
on Windows the length argument actually goes the other way: ~ is shorter than
c:\\.
Anyway, this bug report is about the doc - please clear that up.
next prev parent reply other threads:[~2009-10-06 21:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <83ab03mrlo.fsf@gnu.org>
2009-10-06 17:54 ` bug#4654: 23.1; Elisp manual doc of abbreviate-file-name Drew Adams
2009-10-06 20:21 ` Stefan Monnier
2009-10-06 21:12 ` Drew Adams [this message]
2009-10-07 5:47 ` Stefan Monnier
2009-10-07 7:50 ` Drew Adams
2009-10-07 14:09 ` Stefan Monnier
2009-10-07 15:21 ` Drew Adams
2009-10-07 10:30 ` bug#4654: marked as done (23.1; Elisp manual doc of abbreviate-file-name) Emacs bug Tracking System
[not found] ` <1E8768BDE1464D019FC9EED701E222F4@us.oracle.com>
2009-10-07 17:44 ` bug#4654: 23.1; Elisp manual doc of abbreviate-file-name Eli Zaretskii
2009-10-07 17:55 ` Drew Adams
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=2C5117E03B57417289F8B3E16B1B8B61@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=4654@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.