GNU bug report logs - #4654
23.1; Elisp manual doc of abbreviate-file-name

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 6 Oct 2009 18:00:05 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (Emacs bug Tracking System)
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: bug#4654 closed by Eli Zaretskii <eliz <at> gnu.org> (Re: bug#4654:
 23.1; Elisp manual doc of abbreviate-file-name)
Date: Wed, 07 Oct 2009 10:30:16 +0000
[Message part 1 (text/plain, inline)]
This is an automatic notification regarding your bug report
which was filed against the emacs package:

#4654: 23.1; Elisp manual doc of abbreviate-file-name

It has been closed by Eli Zaretskii <eliz <at> gnu.org>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Eli Zaretskii <eliz <at> gnu.org> by
replying to this email.


-- 
4654: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4654
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Drew Adams <drew.adams <at> oracle.com>, 4654-done <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: Re: bug#4654: 23.1; Elisp manual doc of abbreviate-file-name
Date: Wed, 07 Oct 2009 12:21:55 +0200
> From: "Drew Adams" <drew.adams <at> oracle.com>
> Date: Wed, 7 Oct 2009 00:50:41 -0700
> Cc: 4654 <at> emacsbugs.donarmstrong.com
> 
> a. Always substituting `~' for the home dir is consistent; and it tells you
> where the file is wrt the home dir.
> 
> b. Substituting `~' for the home dir except when it is the root dir breaks
> consistency; but it does tell you where the file is wrt root (in that one
> exceptional case only - otherwise, it tells you where the file is wrt the home
> dir). It also has the advantage of legacy: consistency with the past and
> existing code.
> 
> c. If we were to substitute `~' for the home dir except when that is the root
> dir, on UNIX etc., but not substitute it for the home dir when that is the root
> dir, on Windows, that would ensure that `~' substitution would always shorten
> the file name. But that would introduce additional inconsistency.
> 
> And in any case, substituting using `directory-abbrev-alist' does not guarantee
> shortening at all. Nothing prevents such "abbreviation" from lengthening the
> name.
> 
> Overall, (a) is a better choice than (b) or (c) - unless the legacy
> consideration has particular importance here for some reason (I don't think it
> does).

I hope no one is seriously suggesting to change the behavior of one of
the oldest Emacs APIs...

I fixed the manual.  The description now says

    This function applies abbreviations from @code{directory-abbrev-alist}
    to its argument, and also substitutes @samp{~} for the user's home
    directory if the argument names a file in the home directory or one of
    its subdirectories.  (If the home directory is a root directory, it is
    not replaced with @samp{~}, because this does not make the result
    shorter on many systems.)  You can use it for directory names and for
    file names, because it recognizes abbreviations even as part of the
    name.

I hope this is something everybody can live with.
[Message part 3 (message/rfc822, inline)]
From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 23.1; Elisp manual doc of abbreviate-file-name
Date: Tue, 6 Oct 2009 10:54:09 -0700
The doc string mentions this qualification, but the Elisp manual does
not: " (unless the home directory is a root directory)".
 
Please mention this in the manual also.
 
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.
 
In GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600)
 of 2009-07-29 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4)'
 




This bug report was last modified 15 years and 311 days ago.

Previous Next


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