From: Andreas Schwab <schwab@linux-m68k.org>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 12622@debbugs.gnu.org
Subject: bug#12622: replace-regexp-in-string
Date: Thu, 11 Oct 2012 16:44:03 +0200 [thread overview]
Message-ID: <m2d30pkr0s.fsf@igel.home> (raw)
In-Reply-To: <5076D4F4.2020404@easy-emacs.de> ("Andreas Röhler"'s message of "Thu, 11 Oct 2012 16:17:24 +0200")
Andreas Röhler <andreas.roehler@easy-emacs.de> writes:
> Also would expect a respective form working with replace-regexp-in-string
>
> (setq mystring "[.A foobar] [.B baz]")
> (replace-regexp-in-string "\\_<\\w+\\_>" (concat "\\\\" (match-string-no-properties 0) ) mystring)
>
> but it fails.
Fails in which way? What do you expect, and what do you get?
> When commenting "(match-string 0 str)" as follows it subr.el it works
>
> (setq matches
> (cons (replace-match (if (stringp rep)
> rep
> (funcall rep
> ;; (match-string 0 str)
> ))
> fixedcase literal str subexp)
>
> Which has some plausibility: when receiving a user-specified function, there must not be that argument.
Why? That's what the doc string documents.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2012-10-11 14:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 14:17 bug#12622: replace-regexp-in-string Andreas Röhler
2012-10-11 14:44 ` Andreas Schwab [this message]
2012-10-11 16:38 ` Andreas Röhler
2012-10-11 16:52 ` Andreas Schwab
2012-10-12 6:32 ` Andreas Röhler
2012-10-12 8:14 ` Andreas Schwab
2012-10-12 14:22 ` Stefan Monnier
2012-10-12 16:07 ` Andreas Röhler
2012-10-12 18:12 ` Stefan Monnier
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=m2d30pkr0s.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=12622@debbugs.gnu.org \
--cc=andreas.roehler@easy-emacs.de \
/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.