bug-gnu-emacs
[Top][All Lists]
Advanced

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

find-dired toggle marks in *Find* buffer


From: John Hunter
Subject: find-dired toggle marks in *Find* buffer
Date: Fri, 3 Nov 2000 10:57:45 -0600

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.7.1 (i686-pc-linux-gnu, X toolkit)
 of Tue Jun 27 2000 on video.bsd.uchicago.edu

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

This bug appears when emacs is launched with emacs -q --no-site-file.

When I execute find-dired and supply a filename glob such as

  (find-dired "~/matlab/Neuron/synapse_models" "-name \"*.m\"")

and then in the *Find* buffer execute dired-do-toggle ('t'), the line
which echos the find command is also marked.  

  ~/matlab/Neuron/synapse_models/:
* find . \( -name "*.m" \) -exec ls -ld {} \;
* -rw-r--r--   1 jdhunter 120          1093 Sep 14 12:30 
sen/sen_get_polyexp_params.m
* -rw-r--r--   1 jdhunter 120           325 Aug 29 12:40 sen/sen_polynomial.m

If one then tries to do dired-do-search ('A') you get the error
message 'No file on this line' because the find line is not a file.

Colin Walters <walters+n@cis.ohio-state.edu> suggested this patch on
gnu.emacs.help which fixed the problem for me.

walters@meta:~$ diff -u /usr/src/emacs-20.7/lisp/dired.el lisp/dired.el
--- /usr/src/emacs-20.7/lisp/dired.el   Mon Nov 29 10:04:12 1999
+++ lisp/dired.el       Thu Nov  2 19:19:13 2000
@@ -2021,10 +2021,13 @@
     (dired-move-to-filename)))
 
 (defun dired-between-files ()
-  ;; Point must be at beginning of line
-  ;; Should be equivalent to (save-excursion (not (dired-move-to-filename)))
-  ;; but is about 1.5..2.0 times as fast. (Actually that's not worth it)
-  (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard")
+  ;; Check for special dired lines, like the total or the "find"
+  ;; command that find-dired inserts; note that point must be at
+  ;; beginning of line
+  ;; Should be equivalent to (save-excursion (not
+  ;; (dired-move-to-filename))) but is about 1.5..2.0 times as
+  ;; fast. (Actually that's not worth it)
+  (or (looking-at "^$\\|^. *$\\|^. total\\|^. wildcard\\|^. find")
       (and (looking-at dired-subdir-regexp)
           (save-excursion (not (dired-move-to-filename))))))
 

Thanks!
John Hunter 

Recent input:
down down down down down down down l return l up return 
l down down return down down down down down down down 
down down down down up up up up up up right right right 
right right right right right right right right right 
right right right right right right right right right 
right C-SPC C-right C-right C-right C-right C-right 
left M-w down down down down down down down down down 
down down down down down down down down down down down 
down down down down down down down left M-x r e p o 
tab r tab return

Recent messages:
Loading info...done
Composing main Info directory...
Mark set
Composing main Info directory...done
Mark saved where search started
Buffer is read-only: #<buffer *info*> [3 times]
Mark set
Making completion list...
Loading emacsbug...
Loading emacsbug...done




reply via email to

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