[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

22.1.90; `locate' and "C:" on Windows

From: Reiner Steib
Subject: 22.1.90; `locate' and "C:" on Windows
Date: Wed, 13 Feb 2008 20:19:38 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.90 (gnu/linux)


on Windows, with
I have set up a locate db (using cygwin).  In Emacs, after `M-x locate
RET foo RET', I get:

--8<---------------cut here---------------start------------->8---
 Matches for foo:

--8<---------------cut here---------------end--------------->8---

When I put the mouse over the file name, only "/blub/foobar.baz" is
highlighted, i.e. "C:" is missing.  When pressing mouse-1, I got an

| dired-get-file-for-visit: File no longer exists; type `g' to update dired 

Binding `directory-listing-before-filename-regexp' in
`locate-set-properties' seems to fix the problem for me:

--8<---------------cut here---------------start------------->8---
--- locate.el   09 Jan 2008 20:35:41 +0100      1.49
+++ locate.el   13 Feb 2008 20:08:36 +0100      
@@ -525,7 +525,8 @@
 (defun locate-set-properties ()
-    (let ((pos (locate-get-file-positions)))
+    (let ((pos (locate-get-file-positions))
+         (directory-listing-before-filename-regexp "^ +"))
       (dired-insert-set-properties (elt pos 0) (elt pos 1)))))
 (defun locate-insert-header (search-string)
--8<---------------cut here---------------end--------------->8---

I don't use `locate' very often so I can't do much real life testing.
Unless someone else can confirm that this fix is correct, I'd suggest
to install it only in the trunk.  But maybe someone can come up with a
safe fix for Emacs 22?

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]