unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
Cc: dak@gnu.org, emacs-devel@gnu.org
Subject: Re: query-replace-regexp-eval is quite nice, but...
Date: Mon, 02 Feb 2004 14:03:26 +0100	[thread overview]
Message-ID: <jek735eiqp.fsf@sykes.suse.de> (raw)
In-Reply-To: <200402021216.i12CGdKb015329@beta.mvs.co.il> (Ehud Karni's message of "Mon, 2 Feb 2004 14:16:39 +0200")

"Ehud Karni" <ehud@unix.mvs.co.il> writes:

> How about checking regexp-flag (which is bound by `perform-replace') ?
>
> Assuming your "literal" result string (containing \n) is STR you can
> add something like this to your lisp:
>
>        (if regexp-flag
>            (regexp-quote STR)
>            STR)

regexp-flag is always non-nil when called from query-replace-regexp-eval,
and regexp-quote quotes too much for replace-match.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2004-02-02 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-02  8:53 query-replace-regexp-eval is quite nice, but David Kastrup
2004-02-02 10:24 ` Andreas Schwab
2004-02-02 11:19   ` David Kastrup
2004-02-02 12:16   ` Ehud Karni
2004-02-02 12:17     ` David Kastrup
2004-02-02 13:10       ` Andreas Schwab
2004-02-02 15:01         ` David Kastrup
2004-02-02 15:52         ` Stefan Monnier
2004-02-03 13:22           ` Andreas Schwab
2004-02-02 13:03     ` Andreas Schwab [this message]
2004-02-02 15:03       ` David Kastrup

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jek735eiqp.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=dak@gnu.org \
    --cc=emacs-devel@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 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).