[Top][All Lists]

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

Re: Interactive query-replace

From: Chunyang Xu
Subject: Re: Interactive query-replace
Date: Fri, 10 Feb 2017 12:38:30 +0800
User-agent: mu4e 0.9.18; emacs

Ole Laursen writes:

> Hi!
> I realized the other day that search and replace in Emacs isn't very
> interactive when a coworker showed me another editor he was
> experimenting with. What he somehow did there seemed like something
> Emacs would do when query-replacing, only it doesn't.
> Search and replace has three phases:
> - Enter search term
> - Enter replacement term
> - Confirmation
> Only confirmation is interactive in Emacs.
> The search phase could move the cursor and highlight all matches as
> you type, just like isearch. Then we can see what we're about to
> overwrite.
> Replacement text phase could overwrite each match visible in the
> buffer with the replacement text as you type it. The replacements
> would still be highlighted so it's obvious what's happening. Then we
> can actually evaluate how the replacement works in practice in the
> buffer before committing to it.
> Confirmation then actually commits the changes to the buffer, just like today.
> Doesn't this sound like something Emacs should be doing?
> I'll admit I have no idea how to actually implement it.
> Ole

reply via email to

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