From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#5420: 23.1.91; dired-goto-file does not work with a listing of absolute file names Date: Mon, 18 Jan 2010 17:17:24 -0800 Message-ID: <18FFD0D211884A6E80981C22ED87DBD6@us.oracle.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 1263865181 15724 80.91.229.12 (19 Jan 2010 01:39:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2010 01:39:41 +0000 (UTC) To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 19 02:39:33 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.50) id 1NX348-0004KD-Sm for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Jan 2010 02:39:33 +0100 Original-Received: from localhost ([127.0.0.1]:57143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NX349-0001yg-IO for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2010 20:39:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NX345-0001yQ-3d for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 20:39:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NX33z-0001xz-W7 for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 20:39:28 -0500 Original-Received: from [199.232.76.173] (port=51243 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NX33z-0001xw-Sf for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 20:39:23 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57807) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NX33z-00059P-Mx for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2010 20:39:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NX2jJ-0001i8-LC; Mon, 18 Jan 2010 20:18:01 -0500 X-Loop: bug-gnu-emacs@gnu.org Mail-Followup-To: "Drew Adams" , 5420@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: Tue, 19 Jan 2010 01:18:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5420 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.12638638376562 (code B ref -1); Tue, 19 Jan 2010 01:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Jan 2010 01:17:17 +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 1NX2ia-0001hn-Ja for submit@debbugs.gnu.org; Mon, 18 Jan 2010 20:17:16 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX2iZ-0001hi-6U for submit@debbugs.gnu.org; Mon, 18 Jan 2010 20:17:15 -0500 Original-Received: from mail.gnu.org ([199.232.76.166]:34941 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX2iV-0005P9-Ax for emacs-pretest-bug@gnu.org; Mon, 18 Jan 2010 20:17:11 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NX2iU-0000yT-N1 for emacs-pretest-bug@gnu.org; Mon, 18 Jan 2010 20:17:11 -0500 Original-Received: from acsinet11.oracle.com ([141.146.126.233]:48530) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NX2iU-0000xz-8t for emacs-pretest-bug@gnu.org; Mon, 18 Jan 2010 20:17:10 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet11.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id o0J1H78x006543 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Jan 2010 01:17:08 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o0J0ofv8010479 for ; Tue, 19 Jan 2010 01:17:07 GMT Original-Received: from abhmt002.oracle.com by acsmt356.oracle.com with ESMTP id 1352886321263863826; Mon, 18 Jan 2010 17:17:06 -0800 Original-Received: from dradamslap1 (/141.144.224.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 18 Jan 2010 17:17:06 -0800 X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Thread-Index: AcqYpSf9EQLLAqoGTcekORv1EW0TCw== Importance: High X-Message-Flag: Follow up X-Source-IP: acsmt357.oracle.com [141.146.40.157] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4B550813.007B:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Spam-Score: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -6.3 (------) Resent-Date: Mon, 18 Jan 2010 20:18:01 -0500 X-detected-operating-system: by monty-python.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:34479 gmane.emacs.pretest.bugs:25402 Archived-At: emacs -Q Let A and B be the absolute file names of some existing files, possibly in different directories. You can pass an explicit list of files to `dired', and those file names can be absolute. M-: (dired '("foo" A B)) ; with A and B as absolute file names If you do that, you get a functioning Dired buffer that lists only those files. They are listed as absolute file names, as they must be, since they can be in different directories. No problem; Dired works fine with such a listing, in general - you can do pretty much everything normally. However, `dired-goto-file' does not work in such a listing; `dired-goto-file' does not work if the displayed file names are absolute. M-: (dired-goto-file A) ; with A the absolute file name as listed This is so because `dired-goto-file' searches for a space followed by the _relative_ file name: (let ((base (file-name-nondirectory file)) ; <<< RELATIVE NAME search-string (boundary (dired-subdir-max))) (setq search-string (replace-regexp-in-string "\^m" "\\^m" base nil t)) (setq search-string (replace-regexp-in-string "\\\\" "\\\\" search-string nil t)) (while (and (not found) ;; filenames are preceded by SPC, this makes ;; the search faster (e.g. for the filename "-"!). (search-forward (concat " " search-string) boundary 'move)) ... `dired-goto-file' is used in several places in the code, in addition to its interactive use, so this breaks a certain number of things. In particular, it breaks `dired-mark-remembered', so you cannot restore a set of recorded markings. In GNU Emacs 23.1.91.1 (i386-mingw-nt5.1.2600) of 2010-01-02 on PRETEST Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)'