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#7617: 24.0.50; `expand-file-name': removal of slashes Date: Sun, 12 Dec 2010 12:21:31 -0800 Message-ID: <0910543A74614DBD82DA14ED1B5E4D17@us.oracle.com> References: <7F477A16FFA145E5AB532A96F55D5CDC@us.oracle.com> <022D0B344DB64B2A9E1B771B0695237E@us.oracle.com> <83k4jeu6pf.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292185554 4721 80.91.229.12 (12 Dec 2010 20:25:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 12 Dec 2010 20:25:54 +0000 (UTC) Cc: 7617@debbugs.gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 12 21:25:50 2010 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.69) (envelope-from ) id 1PRsUP-0005Uy-1H for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Dec 2010 21:25:49 +0100 Original-Received: from localhost ([127.0.0.1]:39442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRsUO-0007Ne-7m for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Dec 2010 15:25:48 -0500 Original-Received: from [140.186.70.92] (port=37340 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PRsUF-0007MD-P3 for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2010 15:25:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PRsUD-0000hr-Vb for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2010 15:25:39 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PRsUD-0000hh-TS for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2010 15:25:37 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PRsKv-0001dj-Jz; Sun, 12 Dec 2010 15:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Dec 2010 20:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7617 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7617-submit@debbugs.gnu.org id=B7617.12921849546289 (code B ref 7617); Sun, 12 Dec 2010 20:16:01 +0000 Original-Received: (at 7617) by debbugs.gnu.org; 12 Dec 2010 20:15:54 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRsKn-0001dO-O7 for submit@debbugs.gnu.org; Sun, 12 Dec 2010 15:15:54 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PRsKl-0001dB-Ia for 7617@debbugs.gnu.org; Sun, 12 Dec 2010 15:15:52 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oBCKLwEv011656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 12 Dec 2010 20:22:00 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oBCKLn28016030; Sun, 12 Dec 2010 20:21:56 GMT Original-Received: from abhmt008.oracle.com by acsmt355.oracle.com with ESMTP id 867200041292185289; Sun, 12 Dec 2010 12:21:29 -0800 Original-Received: from dradamslap1 (/10.159.218.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 12 Dec 2010 12:21:29 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <83k4jeu6pf.fsf@gnu.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 Thread-Index: AcuaM6tpi/aFtPJcRVK+Q306JFg8rwAAraGA X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 12 Dec 2010 15:16:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:42447 Archived-At: > > In interactive use, `...//abc...' is treated as just > > `/abc...' by Emacs. The prefix `.../' is ignored until > > you hit `RET'. And then the prefix is dropped > > when you enter the file name (`RET') - but only then. > > And that's appropriate. Other than when you actually > > hit `RET', the prefix should not be removed but > > simply ignored. > > That's right, but I was talking about non-interactive uses. I believe > in interactive use, Emacs still does what you (and I) expect. This is not about existing calls to `expand-file-name' in the vanilla Emacs sources. I am using the function `expand*' on user input (one operation among many), to do just what is advertised for `expand*' - just the kind of canonicalization that is described, which does not include collapsing consecutive slashes. `expand*' does not do what is documented for it. The choices - for this bug report - are to either fix that behavior or provide a function that does what we claim `expand*' does. That is what this bug report is about: providing that functionality, one way or the other. > > Then please create a separate primitive the does just that. > > Feel free to file a separate feature request for that. _This_ bug is about the need for a function that does that. The doc for `expand*' describes it as exactly that function. If you do not want to fix the `expand*' behavior to reflect its description, then please provide the function under a different name from `extract*'. You already have the doc string for it. ;-) I would think that you would want to fix the `extract*' behavior, since it can lead to changing which file is targeted. But if you do not want to face that, then please at least provide some other way to get the behavior that is documented. > > Currently, there is no way to maintain the integrity of the > > user's input if that input is passed through `expand-file-name' > > to do what the doc says `expand*' does. > > If all you need is ignore everything before the double slash, there > are easier ways than asking to change a primitive. You are just running away, Eli. (Why am I not surprised?) Stop inventing. I did not say that I need only to ignore everything before the double slash. If that were all I needed I would just do that in Lisp - no need for any Emacs primitive for that. I said (very clearly) that I need to do just what `expand*' is contracted to do - _everything_ that its doc says it does, and no more. You are ignoring the fact that collapsing consecutive slashes typically leads to changing which file is targeted. I gave a simple example, but you have nothing to say about it. That, to me, is a clear bug in the `expand*' behavior. But if you want to ignore that misbehavior, that's your privilege. I hope that you will at least provide the functionality I asked for, if only via a different function from `extract*'. Barring that, I hope you will tell me how, in Lisp, to get the effect that `expand*' is documented to have, that is, the effect that it had before Emacs 21.