unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: peter_breton@yahoo.com, pete_lee@swbell.net, eliz@gnu.org,
	emacs-devel@gnu.org
Subject: Re: insert-directory
Date: Sun, 23 May 2004 22:29:04 -0500 (CDT)	[thread overview]
Message-ID: <200405240329.i4O3T4B08005@raven.dms.auburn.edu> (raw)
In-Reply-To: <200405240000.i4O00ck07917@raven.dms.auburn.edu> (message from Luc Teirlinck on Sun, 23 May 2004 19:00:38 -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	other threads:[~2004-05-24  3:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-23 22:18 insert-directory Luc Teirlinck
2004-05-24  0:00 ` insert-directory Luc Teirlinck
2004-05-24  3:29   ` Luc Teirlinck [this message]
2004-05-24  3:55     ` insert-directory Luc Teirlinck
2004-05-24  3:55     ` insert-directory Luc Teirlinck
2004-05-24  4:16     ` insert-directory Luc Teirlinck
2004-05-25  0:11       ` insert-directory Luc Teirlinck
2004-05-25  2:16         ` insert-directory Luc Teirlinck
2004-05-26 20:26           ` insert-directory Luc Teirlinck
2004-05-26 20:35             ` insert-directory David Kastrup
2004-05-26 20:42               ` insert-directory Luc Teirlinck
2004-05-27  7:01             ` insert-directory Kai Grossjohann
2004-05-27 15:51               ` insert-directory Luc Teirlinck
2004-06-07  9:59               ` locate and find-dired (was: insert-directory) Juri Linkov
2004-06-07 11:17                 ` locate and find-dired Kai Grossjohann
2004-06-07 11:59                   ` Juri Linkov
2004-05-25 16:06   ` insert-directory Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405240329.i4O3T4B08005@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pete_lee@swbell.net \
    --cc=peter_breton@yahoo.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).