unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* regexp repacement, how to present replacement to user?
@ 2007-10-13 14:00 Paul Pogonyshev
  2007-10-14 22:50 ` Juri Linkov
  0 siblings, 1 reply; 30+ messages in thread
From: Paul Pogonyshev @ 2007-10-13 14:00 UTC (permalink / raw)
  To: emacs-devel

Hi,

I basically have a loop of `re-search-forward' with optional `replace-match'
after that.  I'd like to ask user if the particular match should be replaced
or not.  However, I'd like to present user with end-result strings, i.e. not
regexp and replacement with \N strings, but the match string and what
replacement would be in this case.  The former is as easy as (match-string 0),
but the second is not obvious how to do.

I.e., to clarify, I'd like this:

	Replace "foo-bar" with "foo bar"?

instead of this:

	Replace "\([[:alpha:]]+\)-\([[:alpha:]]+\)" with "\1 \2"?

Paul

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2007-11-11  5:21 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-13 14:00 regexp repacement, how to present replacement to user? Paul Pogonyshev
2007-10-14 22:50 ` Juri Linkov
2007-10-15  3:20   ` Stefan Monnier
2007-10-15  5:57     ` David Kastrup
2007-10-15 20:28       ` Paul Pogonyshev
2007-10-16 23:54         ` Juri Linkov
2007-10-17  6:06           ` David Kastrup
2007-10-17 19:25           ` Paul Pogonyshev
2007-10-20 13:53             ` [patch] " Paul Pogonyshev
2007-10-21 16:26               ` Richard Stallman
2007-10-21 19:00                 ` Paul Pogonyshev
2007-10-21 20:43                   ` Juri Linkov
2007-10-21 21:15                     ` Paul Pogonyshev
2007-10-22  1:22                   ` Stefan Monnier
2007-10-26  3:48                     ` Richard Stallman
2007-10-28 14:41                       ` Paul Pogonyshev
2007-10-29  9:22                         ` Richard Stallman
2007-10-30 14:16                           ` Juri Linkov
2007-10-31  7:46                             ` Richard Stallman
2007-10-31 21:39                               ` Paul Pogonyshev
2007-11-01  7:32                                 ` Richard Stallman
2007-11-02 20:58                                   ` Paul Pogonyshev
2007-11-10 15:01                                     ` Paul Pogonyshev
2007-11-11  5:21                                       ` Richard Stallman
2007-11-10 21:54                                     ` Juri Linkov
2007-10-23  7:12                   ` Richard Stallman
2007-10-23  8:16                     ` David Kastrup
2007-10-23 17:53                       ` Richard Stallman
2007-10-23 19:03                         ` Lennart Borgman (gmail)
2007-10-24  8:32                           ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).