[Top][All Lists]

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

bug#11746: feature request: `isearch-query-replace' should open invisibl

From: Juri Linkov
Subject: bug#11746: feature request: `isearch-query-replace' should open invisible text
Date: Thu, 30 May 2013 03:03:00 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

Actually opening hidden overlays is not optimal when the user types `!'
for automatic replacement.  There is no need to open overlays and
immediately close afterwards without seeing opened text by the user.
This can be improved with this patch:

=== modified file 'lisp/replace.el'
--- lisp/replace.el     2013-05-29 23:16:44 +0000
+++ lisp/replace.el     2013-05-30 00:00:39 +0000
@@ -2111,6 +2111,9 @@ (defun perform-replace (from-string repl
            (setq skip-filtered-count (1+ skip-filtered-count)))
           ;; Optionally ignore invisible matches.
           ((not (or (eq search-invisible t)
+                    ;; Don't open overlays for automatic replacements.
+                    (and (not query-flag) search-invisible)
+                    ;; Open hidden overlays for interactive replacements.
                     (not (isearch-range-invisible
                           (nth 0 real-match-data) (nth 1 real-match-data)))))
            (setq skip-invisible-count (1+ skip-invisible-count)))

reply via email to

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