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

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

replace-within-highlighted-region - Is it possible to write? or too hard


From: gnuist
Subject: replace-within-highlighted-region - Is it possible to write? or too hard?
Date: Sun, 21 Jul 2024 01:50:13 +0000

Hi - I am thinking of a function where you can highlight region, only lets say 
of one color (ie category) and then be able to replace strings or regexp within 
those region only.

Functionally, it would be equivalent to narrowing to multiple regions all at 
once, based on a regexp and highlighting those regions.

In my previous posts on ediff-buffers, I was thinking that #f or focus provided 
such a functionality within each active region and REFINED to it as the new 
active region within what was highlighted before it.

In addition, I was thinking that #h provided a functionality whereby you would 
be able to ignore those regions (ie matched strings) that would be masked.

The problem with narrow-to-region is that undoing is harder of a macro, whereas 
replace can be undone with a single undo.

As it is, the current #f is almost equivalent to show-lines-matching-regexp and 
#h is almost equivalent to hide-lines-matching-regexp.

Tx



reply via email to

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