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#7126: 24.0.50; [PATCH] `dired-goto-file' fails when `dired' is passed a cons with absolutefile names Date: Tue, 28 Sep 2010 16:53:40 -0700 Message-ID: <38695CE2A0AE429FA95C2BA34870B6F0@us.oracle.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00CF_01CB5F2D.B491C450" X-Trace: dough.gmane.org 1285719096 11803 80.91.229.12 (29 Sep 2010 00:11:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Sep 2010 00:11:36 +0000 (UTC) To: <7126@debbugs.gnu.org> Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 29 02:11:34 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 1P0kGf-0006Jm-9t for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Sep 2010 02:11:29 +0200 Original-Received: from localhost ([127.0.0.1]:33835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0kGe-0005Io-CC for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Sep 2010 20:11:28 -0400 Original-Received: from [140.186.70.92] (port=57640 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0kGY-0005HW-Ik for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2010 20:11:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0kGW-0003Ji-VF for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2010 20:11:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48939) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0kGW-0003Jc-Tm for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2010 20:11:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1P0jyo-0005Xv-8n; Tue, 28 Sep 2010 19:53:02 -0400 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: Tue, 28 Sep 2010 23:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7126 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7126-submit@debbugs.gnu.org id=B7126.128571792521305 (code B ref 7126); Tue, 28 Sep 2010 23:53:02 +0000 Original-Received: (at 7126) by debbugs.gnu.org; 28 Sep 2010 23:52:05 +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 1P0jxs-0005Xa-QA for submit@debbugs.gnu.org; Tue, 28 Sep 2010 19:52:04 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0jxr-0005XC-3q for 7126@debbugs.gnu.org; Tue, 28 Sep 2010 19:52:03 -0400 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 o8SNspWK005838 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <7126@debbugs.gnu.org>; Tue, 28 Sep 2010 23:54:53 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id o8SNsmBH032147 for <7126@debbugs.gnu.org>; Tue, 28 Sep 2010 23:54:48 GMT Original-Received: from abhmt017.oracle.com by acsmt353.oracle.com with ESMTP id 645174451285718020; Tue, 28 Sep 2010 16:53:40 -0700 Original-Received: from dradamslap1 (/10.159.216.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 28 Sep 2010 16:53:40 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: ActfWCC4Vdwq3bVZSgq9KEYXfRPSBgAD/oWg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 28 Sep 2010 19:53:02 -0400 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:40527 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_00CF_01CB5F2D.B491C450 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I think the attached patch takes care of it. But it would be good if others also tested it. ------=_NextPart_000_00CF_01CB5F2D.B491C450 Content-Type: application/octet-stream; name="dired-2010-09-28.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dired-2010-09-28.patch" diff -cw dired.el dired-patched-2010-09-28.el=0A= *** dired.el Tue Sep 28 16:42:22 2010=0A= --- dired-patched-2010-09-28.el Tue Sep 28 16:48:48 2010=0A= ***************=0A= *** 2480,2486 ****=0A= --- 2480,2498 ----=0A= (setq dir (or (file-name-directory file)=0A= (error "File name `%s' is not absolute" file)))=0A= (save-excursion=0A= + (goto-char (point-min))=0A= + (let ((search-string (replace-regexp-in-string "\^m" "\\^m" = file nil t)))=0A= + (setq search-string (replace-regexp-in-string "\\\\" "\\\\" = search-string nil t))=0A= + (while (and (not (eobp)) (not found))=0A= + (if (search-forward (concat " " search-string) nil 'NO-ERROR)=0A= + ;; Must move to filename since an (actually correct) = match could have been=0A= + ;; elsewhere on the line (e.g. "-" would match somewhere = in permission bits).=0A= + (setq found (dired-move-to-filename))=0A= + ;; If this isn't the right line, move forward to avoid = trying this line again.=0A= + (forward-line 1)))))=0A= + (unless found=0A= ;; The hair here is to get the result of dired-goto-subdir=0A= + (save-excursion=0A= ;; without really calling it if we don't have any subdirs.=0A= (if (if (string=3D dir (expand-file-name default-directory))=0A= (goto-char (point-min))=0A= ***************=0A= *** 2509,2515 ****=0A= (setq found (dired-move-to-filename))=0A= ;; If this isn't the right line, move forward to avoid=0A= ;; trying this line again.=0A= ! (forward-line 1))))))=0A= (and found=0A= ;; return value of point (i.e., FOUND):=0A= (goto-char found))))=0A= --- 2521,2527 ----=0A= (setq found (dired-move-to-filename))=0A= ;; If this isn't the right line, move forward to = avoid=0A= ;; trying this line again.=0A= ! (forward-line 1)))))))=0A= (and found=0A= ;; return value of point (i.e., FOUND):=0A= (goto-char found))))=0A= =0A= Diff finished. Tue Sep 28 16:49:01 2010=0A= ------=_NextPart_000_00CF_01CB5F2D.B491C450--