[Top][All Lists]

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

Re: A better UI than perform-replace

From: Juri Linkov
Subject: Re: A better UI than perform-replace
Date: Wed, 18 Nov 2015 02:55:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu)

> I think a better UI for `perform-replace' is warranted.  The current
> thing is very basic:
> - No good way to see how many matches there are.
> - No good way to get an overview of matches per buffer.

It's easy to run 'occur' to display all matches and total match count.

> - No good way to pause the replacement procedure.

C-r enters recursive edit (C-M-c to get out again).

> - No good way to undo a replacement.

Undo is implemented in bug#21684.

> An idea to improve this would be with a permanent *replace* buffer,
> similar to `dired' or *Buffer List*. This buffer would be visible during
> the replacement operation, together with the actual buffers that contain
> the candidates.

Good idea.  And as addressing your first concern above suggests,
the most suitable buffer would be *Occur* itself.  It already
displays all matches, and what is missing is just what you propose:
new keybindings and Dired-like indication on the left edge.

In fact, we already have 'occur-edit-mode' acting on *Occur* buffer.
So what we could do is to add a similar mode 'occur-replace-mode'
that will perform 'automatic-all' on 'C-c C-c'.

reply via email to

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