GNU bug report logs -
#6362
Emacs command `dired-isearch-filenames-regexp' cause CPU usage 100%
Previous Next
Reported by: Li Zhai <mrzhaili <at> gmail.com>
Date: Sun, 6 Jun 2010 03:37:01 UTC
Severity: normal
Found in version 23.2.1
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> You can observe the same problem with query-replace in wdired.
> For instance, type:
>
> 1. M-x wdired-change-to-wdired-mode RET
> 2. M-x query-replace-regexp RET ^f RET replacement RET
BTW, there is another bug in query-replace lazy-highlighting in dired.
Wdired sets `query-replace-skip-read-only' to replace only in
file names, but during replacement all read-only matches are
lazy-highlighted too. This can be fixed with this patch:
=== modified file 'lisp/wdired.el'
--- lisp/wdired.el 2010-01-13 08:35:10 +0000
+++ lisp/wdired.el 2010-06-06 18:09:04 +0000
@@ -243,6 +243,8 @@ (defun wdired-change-to-wdired-mode ()
(buffer-substring (point-min) (point-max)))
(set (make-local-variable 'wdired-old-point) (point))
(set (make-local-variable 'query-replace-skip-read-only) t)
+ (set (make-local-variable 'isearch-filter-predicate)
+ 'wdired-isearch-filter-read-only)
(use-local-map wdired-mode-map)
(force-mode-line-update)
(setq buffer-read-only nil)
@@ -268,6 +270,11 @@ (defun wdired-change-to-wdired-mode ()
"Press \\[wdired-finish-edit] when finished \
or \\[wdired-abort-changes] to abort changes")))
+(defun wdired-isearch-filter-read-only (beg end)
+ "Skip matches that have a read-only property."
+ (and (isearch-filter-visible beg end)
+ (not (text-property-not-all (min beg end) (max beg end)
+ 'read-only nil))))
;; Protect the buffer so only the filenames can be changed, and put
;; properties so filenames (old and new) can be easily found.
--
Juri Linkov
http://www.jurta.org/emacs/
This bug report was last modified 13 years and 260 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.