emacs-devel
[Top][All Lists]
Advanced

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

Re: A better UI than perform-replace


From: John Yates
Subject: Re: A better UI than perform-replace
Date: Thu, 19 Nov 2015 14:11:40 -0500

On Thu, Nov 19, 2015 at 11:31 AM, John Wiegley <address@hidden> wrote:
Wanting to use Emacs for other editing, while in the middle of a replace
operation, is fairly expert also. We don't use a separate window with "Find
Next" and "Replace" buttons, as graphical editors do: we use a modal prompt in
the mini-buffer. Most Emacs users expect this to mean that they must complete
their operation before Emacs is fully available again.

Disclaimer: my model for the proposed interaction is query-replace.
If we are actually contemplating something quite different then
perhaps my comments are irrelevant.  That said...

The usage scenario is not uncommon and is not an instance of wanting
to perform arbitrary editing in the middle of a replace operation.
Rather it is a question of wanting (or needing) to clean-up alignment
_after_ replacing a token with a token of a different length.  A very
common instance is ensuring that end of line comments start at a
specified column.

IIUC when prompted as to whether I wish to replace the current token
the recursive edit approach requires that I:

  1) type C-r to enter a recursive edit
  2) adjust whitespace (thereby corrupting the visible alignment
     around the as yet un-replaced token) hoping that I properly
     anticipate the whitespace needs that will obtain once the
     replace actually occurs
  3) type C-M-c to exit recursive edit
  4) respond to the query-replace prompt

Following 4) token replacement occurs and the display updates to
the next match.  I get no visual feedback as to whether my attempt
to adjust alignment was actually correct.  This is the antithesis
of a satisfactory WYSIWYG experience.  I might as well be editing
in TECO (which _I_ actually did at the beginning of my career :-)

If I am working in an environment that bans hard tabs I just may
get it right.  Allow hard tabs and I doubt that there is a person
on this list who would defend the experience.

/john

reply via email to

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