[Top][All Lists]

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

Re: A better UI than perform-replace (was: Rename refactoring, or someth

From: Richard Stallman
Subject: Re: A better UI than perform-replace (was: Rename refactoring, or something like that)
Date: Tue, 17 Nov 2015 17:57:16 -0500

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > - No good way to pause the replacement procedure.

You can do that easily by typing any ordinary editing
command, or ESC.  To resume, use C-x ESC ESC RET.

  > - No good way to undo a replacement.

Yes there is: type C-_ (C-- on an X terminal).

Nonethless, I can see how your new mode might be useful.  But the
*replace* buffer might also get in the way.

I think we should poll the users before changing the default behavior.
We could ask them to suggest changes in the new feature
as well as to say whether they want it as the default.

  > To re-describe things in a shorter way, *replace* should be a staging
  > area for the `perform-replace' operation.

I see a possible pitfall here.  It seems to envision finding all the
matches before operating on any of them.

Currently, if you pause and resume the query replace loop, it resumes
starting from point and it finds all matches in the current text after
point.  So if during he pause you edited something below, creating or
eliminating matches, it operates on the matches that exist after those

But if the list of matches was made in advance, it won't understand
that the buffer has changed.  It can double-check the old matches
to make sure they still match, but it will ignore newly introduced

Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.

reply via email to

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