Re: [PATCH] Optional preview of the replacement text while typing it

Juri Linkov <[email protected]> Sun, 09 Aug 2026 09:53:35 +0300
Newsgroups gmane.emacs.devel
Organization LINKOV.NET
Message-ID <[email protected]>
> Do you think an option to see both the match and the replacement
> (instead of just the replacement) makes sense? They can be separated by
> an arrow key and use different faces, something like in the attached
> screenshot.
>
> Maybe this is one of the features Juri mentioned can be added later?

Exactly.  And the screenshot you attached looks very nice.

To customize the display of both strings side by side
(matches and replacements) we could have a special value 'both'
of the new option 'query-replace-show-preview'.

Another feature that could be added later is to have a variable
that contains a string to display for zero-length matches.
Like a vertical bar for empty rectangular region after 'C-x SPC'.