all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <f92capac@gmail.com>
To: Richard Stallman <rms@gnu.org>
Cc: Tino Calancha <f92capac@gmail.com>, 21684@debbugs.gnu.org
Subject: bug#21684: 25.0.50; undo in query-replace w/o exit
Date: Mon, 19 Oct 2015 10:20:25 +0900 (JST)	[thread overview]
Message-ID: <alpine.LRH.2.20.1510191017210.16532@calancha-ilc.kek.jp> (raw)
In-Reply-To: <E1ZnqMJ-0007Pd-4b@fencepost.gnu.org>


> What change in functionality is being considered here?

Hi Richard,

the purpose is provide 'undo' into `query-replace'/`query-replace-regexp'.
Original code do not support such functionality in a convenient way.

For instance, in the scratch buffer:
M-x query-replace RET f RET @ RET [space] RET [space] RET C-/
(C-/ undo last replacement but end session: [space] would insert one space)

Indeed, you may correct last replacement with existing code without exit current
search replace, as follows:

I)
M-x query-replace RET f RET @ RET [space] RET [space] "^" C-r
(now you can edit last replacement; comeback to query-replace session with C-M-c)
C-M-c [space] [space] ...

This seems too complicated/slow to just undo last 1-2 replacements.

In my experience as an user 99% of the times, the situation is that i hit [space]
many times and fast, and then i realize i just want to undo last 1-2 
replacements and keep going. It would be useful if that can be done just 
with one key.

The patch replace-3.patch in this thread implements such interactive undo and binds
the new funtionality to keys "u" and "U".

Every time you hit "u" the latest replacement is undo: now you can hit "n" to skip
it (tipically) or [space] to replace it again, or maybe "u" to undo 
another previous replacement (if any). The query-replace session is not 
exit.

Tino





  reply	other threads:[~2015-10-19  1:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 13:26 bug#21684: 25.0.50; undo in query-replace w/o exit Tino Calancha
2015-10-14 16:23 ` Juri Linkov
2015-10-17 13:04   ` Tino Calancha
2015-10-17 21:49     ` Juri Linkov
2015-10-18  9:45       ` Tino Calancha
2015-10-18 15:58         ` Richard Stallman
2015-10-19  1:20           ` Tino Calancha [this message]
2015-10-19 22:04             ` Juri Linkov
2015-10-20 12:02               ` Tino Calancha
2016-02-23  8:40                 ` Lars Ingebrigtsen
2016-02-23 16:46                   ` Tino Calancha
2016-02-23 17:54                     ` Eli Zaretskii
2016-02-24  1:36                     ` Lars Ingebrigtsen
2016-02-24 13:13                       ` Tino Calancha
2016-05-31 22:32                       ` Glenn Morris
2016-06-01  2:44                         ` Tino Calancha
2016-06-01 17:45                           ` Glenn Morris
2016-06-01 17:53                             ` Lars Ingebrigtsen
2016-06-01 17:56                               ` Glenn Morris
2016-06-02 16:44                                 ` Glenn Morris
2016-06-04 22:06                         ` bug#21663: 25.0.50; isearch-edit-string dont resume multi isearches Juri Linkov
2015-10-26  4:09             ` bug#21684: 25.0.50; undo in query-replace w/o exit Richard Stallman
     [not found] ` <handler.21684.B.144482901430164.ack@debbugs.gnu.org>
2015-10-20 13:01   ` bug#21684: Acknowledgement (25.0.50; undo in query-replace w/o exit) Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.20.1510191017210.16532@calancha-ilc.kek.jp \
    --to=f92capac@gmail.com \
    --cc=21684@debbugs.gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.