From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eduard Wiebe Newsgroups: gmane.emacs.bugs Subject: bug#7308: [patch] locate under windoze Date: Sun, 14 Nov 2010 10:15:20 +0100 Message-ID: <8739r4nu53.fsf@pusto.de> References: <87hbg3piit.fsf@pusto.de> <87d3qpytrx.fsf@pusto.de> <87wroiuvzy.fsf@pusto.de> <87mxpdkq68.fsf@stupidchicken.com> <8339r4exco.fsf@gnu.org> <87oc9sq2fv.fsf@pusto.de> <83tyjkd08a.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289727868 3552 80.91.229.12 (14 Nov 2010 09:44:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 14 Nov 2010 09:44:28 +0000 (UTC) Cc: 7308@debbugs.gnu.org, cyd@stupidchicken.com, Eduard Wiebe To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 14 10:44:23 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 1PHZ8I-00021B-35 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Nov 2010 10:44:22 +0100 Original-Received: from localhost ([127.0.0.1]:34838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHZ8H-0006Ck-H1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Nov 2010 04:44:21 -0500 Original-Received: from [140.186.70.92] (port=32977 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHZ85-00069P-Hl for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2010 04:44:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHZ80-0000ZB-Tp for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2010 04:44:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHZ80-0000Z7-Qt for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2010 04:44:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PHYcz-0002su-KT; Sun, 14 Nov 2010 04:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eduard Wiebe Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2010 09:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7308 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 7308-submit@debbugs.gnu.org id=B7308.128972591511082 (code B ref 7308); Sun, 14 Nov 2010 09:12:01 +0000 Original-Received: (at 7308) by debbugs.gnu.org; 14 Nov 2010 09:11:55 +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 1PHYcs-0002sh-IB for submit@debbugs.gnu.org; Sun, 14 Nov 2010 04:11:54 -0500 Original-Received: from wp093.webpack.hosteurope.de ([80.237.132.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PHYcp-0002sb-UR for 7308@debbugs.gnu.org; Sun, 14 Nov 2010 04:11:52 -0500 Original-Received: from g227148119.adsl.alicedsl.de ([92.227.148.119] helo=nirvana); authenticated by wp093.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) id 1PHYhX-0007Ih-H5; Sun, 14 Nov 2010 10:16:43 +0100 Original-Received: from ew by nirvana with local (Exim 4.69) (envelope-from ) id 1PHYgC-0001N8-EP; Sun, 14 Nov 2010 10:15:20 +0100 In-Reply-To: <83tyjkd08a.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2010 05:59:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-bounce-key: webpack.hosteurope.de;ew@pusto.de;1289726210;d42c363b; X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 14 Nov 2010 04:12: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:41610 Archived-At: Eli Zaretskii writes: >> From: Eduard Wiebe >> Cc: Chong Yidong , 7308@debbugs.gnu.org >> Date: Sat, 13 Nov 2010 23:33:08 +0100 >> >> > I'm okay with the main change, but I don't understand the reason (or >> > need) for this hunk: >> > >> > @@ -473,9 +483,9 @@ do not work in subdirectories. >> > (make-local-variable 'directory-listing-before-filename-regexp) >> > ;; This should support both Unix and Windoze style names >> > (setq directory-listing-before-filename-regexp >> > - (concat "^." >> > + (concat "^.\\(" >> > (make-string (1- locate-filename-indentation) ?\s) >> > - "\\(/\\|[A-Za-z]:\\)\\|" >> ^^^^^^^^^^^^^^^^^^^^ >> >> > + "\\)\\|" >> > (default-value 'directory-listing-before-filename-regexp))) >> > (make-local-variable 'dired-actual-switches) >> > (setq dired-actual-switches "") >> >> This hunk is essential. The new value of the regexp avoids the >> truncation of the drive letter from absolute path of the selected file. >> >> Btw. Under GNU/Linux this change leads to correct position of cursor in >> *Locate* buffer, too. > Sorry, I still don't understand: what truncation? Under MS-Windows my *Locate* buffer looks like this (* is the point): ---------------------------------------------------------------------- e:*\path\to\file1 e:\path\to\file2 f:\path\to\another\file -- *Locate*----------------------------------------------------------- If i choose 'e:\path\to\file1', the function `dired-get-filename' is called and tries to visit '\path\to\file1' (without the drive letter) and fails because the path is incomplete. > what incorrect position? Consider the same example on GNU/Linux with following *Locate* buffer: ---------------------------------------------------------------------- /*home/ew/.emacs /home/ew/.emacs.d -- *Locate*----------------------------------------------------------- if i choose '/home/ew/.emacs' the function `dired-get-file' is called and visits 'home/ew/.emacs', but not fails (albeit more by chance) because of `default-directory' is '/' and the extracted path is interpreted as a relative path to `default-directory'. > Please explain more. With my patch, the point is always in front of a file path in the *Locate* buffer and leads to correct file path extraction if i try to visit selected file path. I hope that helps and sorry for previous poor explanation. -- Eduard Wiebe