emacs-devel
[Top][All Lists]
Advanced

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

Re: insert-directory


From: Luc Teirlinck
Subject: Re: insert-directory
Date: Sun, 23 May 2004 22:29:04 -0500 (CDT)

With my latest patch, `i' inserts subdirectories correctly, but the
file names are not correctly recognized.  That is, one can see what
the files are, but one can not operate on them.  To fix that, one
needs a much more liberal definition of `dired-move-to-filename-regexp'
in *Locate* buffers.  (See the patch below.)  Essentially, the new
regexp first tries to recognize the file names as before.  If this does
not work, anything after the first two spaces is treated as the filename,
except if it starts with `/', in which case there is no file on the line.
Seems to work well.  Are there any situations where this could give trouble?

===File ~/locate-diff=======================================
*** locate.el   20 May 2004 17:14:36 -0500      1.22
--- locate.el   23 May 2004 21:58:54 -0500      
***************
*** 345,353 ****
    (make-local-variable 'dired-move-to-filename-regexp)
    ;; This should support both Unix and Windoze style names
    (setq dired-move-to-filename-regexp
!       (concat "."
                (make-string (1- locate-filename-indentation) ?\ )
!               "\\(/\\|[A-Za-z]:\\)"))
    (make-local-variable 'dired-actual-switches)
    (setq dired-actual-switches "")
    (make-local-variable 'dired-permission-flags-regexp)
--- 345,353 ----
    (make-local-variable 'dired-move-to-filename-regexp)
    ;; This should support both Unix and Windoze style names
    (setq dired-move-to-filename-regexp
!       (concat "\\(."
                (make-string (1- locate-filename-indentation) ?\ )
!               "\\(/\\|[A-Za-z]:\\)\\)\\|  /.*\\|  "))
    (make-local-variable 'dired-actual-switches)
    (setq dired-actual-switches "")
    (make-local-variable 'dired-permission-flags-regexp)
============================================================




reply via email to

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