From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#4654: 23.1; Elisp manual doc of abbreviate-file-name Date: Tue, 6 Oct 2009 14:12:51 -0700 Message-ID: <2C5117E03B57417289F8B3E16B1B8B61@us.oracle.com> References: Reply-To: Drew Adams , 4654@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1254868055 20986 80.91.229.12 (6 Oct 2009 22:27:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Oct 2009 22:27:35 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, 4654@emacsbugs.donarmstrong.com To: "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 07 00:27:24 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MvIVA-0002SX-CP for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Oct 2009 00:27:24 +0200 Original-Received: from localhost ([127.0.0.1]:37367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvIV9-00043d-Ko for geb-bug-gnu-emacs@m.gmane.org; Tue, 06 Oct 2009 18:27:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvIV2-00041D-R1 for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:27:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvIUy-00040a-7X for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:27:16 -0400 Original-Received: from [199.232.76.173] (port=40541 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvIUy-00040W-3r for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:27:12 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43184) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvIUx-0002XB-Cq for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:27:11 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n96MR8ii025391; Tue, 6 Oct 2009 15:27:09 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n96MK5YV024018; Tue, 6 Oct 2009 15:20:05 -0700 Resent-Date: Tue, 6 Oct 2009 15:20:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Drew Adams" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Tue, 06 Oct 2009 22:20:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4654 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125486727423040 (code B ref -1); Tue, 06 Oct 2009 22:20:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 6 Oct 2009 22:14:34 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n96MEXsG023037 for ; Tue, 6 Oct 2009 15:14:34 -0700 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvIIi-00071S-HJ for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:14:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvIIc-0006xD-Ns for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:14:31 -0400 Original-Received: from [199.232.76.173] (port=57817 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvIIc-0006xA-Iq for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:14:26 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:37064 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MvIIc-0000UH-8G for bug-gnu-emacs@gnu.org; Tue, 06 Oct 2009 18:14:26 -0400 Original-Received: from rgminet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n96MDu4h006080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 6 Oct 2009 22:13:58 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rgminet13.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n96MEewd006132; Tue, 6 Oct 2009 22:14:46 GMT Original-Received: from abhmt004.oracle.com by acsmt353.oracle.com with ESMTP id 20245941891254867233; Tue, 06 Oct 2009 15:13:53 -0700 Original-Received: from dradamslap1 (/141.144.169.34) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 06 Oct 2009 14:12:28 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcpGwvRQNmd20svrSNu03VBTd9ykLwAAY5lw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090205.4ACBC137.000B:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-CrossAssassin-Score: 2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 06 Oct 2009 18:27:16 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:31740 Archived-At: > > 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.