From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: insert-directory Date: Sun, 23 May 2004 22:29:04 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200405240329.i4O3T4B08005@raven.dms.auburn.edu> References: <200405232218.i4NMIw307789@raven.dms.auburn.edu> <200405240000.i4O00ck07917@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1085369830 19154 80.91.224.253 (24 May 2004 03:37:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 May 2004 03:37:10 +0000 (UTC) Cc: peter_breton@yahoo.com, pete_lee@swbell.net, eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 24 05:37:01 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BS6Gr-0005Qa-00 for ; Mon, 24 May 2004 05:37:01 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BS6Gr-0003Ab-00 for ; Mon, 24 May 2004 05:37:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BS6Cc-00064S-8m for emacs-devel@quimby.gnus.org; Sun, 23 May 2004 23:32:38 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BS6CH-00063z-78 for emacs-devel@gnu.org; Sun, 23 May 2004 23:32:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BS69r-0004SE-Od for emacs-devel@gnu.org; Sun, 23 May 2004 23:30:20 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BS69q-0004PO-6X; Sun, 23 May 2004 23:29:46 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i4O3TcuE013554; Sun, 23 May 2004 22:29:38 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i4O3T4B08005; Sun, 23 May 2004 22:29:04 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200405240000.i4O00ck07917@raven.dms.auburn.edu> (message from Luc Teirlinck on Sun, 23 May 2004 19:00:38 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23870 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23870 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) ============================================================