From: Eduard Wiebe <ew@pusto.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 7308@debbugs.gnu.org, cyd@stupidchicken.com,
Eduard Wiebe <usenet@pusto.de>
Subject: bug#7308: [patch] locate under windoze
Date: Sun, 14 Nov 2010 10:15:20 +0100 [thread overview]
Message-ID: <8739r4nu53.fsf@pusto.de> (raw)
In-Reply-To: <83tyjkd08a.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2010 05:59:17 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Eduard Wiebe <usenet@pusto.de>
>> Cc: Chong Yidong <cyd@stupidchicken.com>, 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
next prev parent reply other threads:[~2010-11-14 9:15 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-30 19:50 bug#7308: [patch] locate under windoze Eduard Wiebe
2010-10-30 21:21 ` Eli Zaretskii
2010-10-31 9:36 ` Eduard Wiebe
2010-10-31 9:48 ` Thierry Volpiatto
2010-10-31 10:51 ` Eli Zaretskii
2010-10-31 19:54 ` Eduard Wiebe
2010-10-31 20:26 ` Eli Zaretskii
2010-10-31 6:56 ` Thierry Volpiatto
2010-10-31 7:49 ` Eli Zaretskii
2010-10-31 9:41 ` Thierry Volpiatto
2010-10-31 10:47 ` Eli Zaretskii
2010-10-31 11:13 ` Thierry Volpiatto
2010-11-01 6:54 ` Glenn Morris
2010-11-01 7:46 ` Eduard Wiebe
2010-11-01 14:06 ` Stefan Monnier
2010-11-01 14:59 ` Eduard Wiebe
2010-11-12 20:28 ` Eduard Wiebe
2010-11-13 18:57 ` Chong Yidong
2010-11-13 21:18 ` Eli Zaretskii
2010-11-13 22:33 ` Eduard Wiebe
2010-11-14 3:59 ` Eli Zaretskii
2010-11-14 9:15 ` Eduard Wiebe [this message]
2010-11-27 9:59 ` Eli Zaretskii
[not found] ` <87bp5970hs.fsf@pusto.de>
2010-11-28 19:46 ` bug#5462: " Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8739r4nu53.fsf@pusto.de \
--to=ew@pusto.de \
--cc=7308@debbugs.gnu.org \
--cc=cyd@stupidchicken.com \
--cc=eliz@gnu.org \
--cc=usenet@pusto.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.