GNU bug report logs - #11746
feature request: `isearch-query-replace' should open invisible text

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Tue, 19 Jun 2012 17:59:01 UTC

Severity: wishlist

Merged with 14566

Found in version 24.3

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #28 received at 11746 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: 11746 <at> debbugs.gnu.org
Cc: michael_heerdegen <at> web.de
Subject: Re: bug#11746: feature request: `isearch-query-replace' should open
	invisible text
Date: Thu, 30 May 2013 03:03:00 +0300
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)))





This bug report was last modified 11 years and 340 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.