unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
To: help-gnu-emacs@gnu.org
Subject: Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?
Date: Sat, 16 Aug 2008 17:45:07 +0200	[thread overview]
Message-ID: <87ljyx3qws.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: ee75fde5-2e4f-47b6-9847-a1ccc098955d@8g2000hse.googlegroups.com

On Sat, Aug 16 2008, harven wrote:

>> David Kastrup once mention this (or a similar example with
>> `replace-regexp') on some newsgroup or mailing list.  I don't remember
>> if it is possible to use this with M-x replace-... or
>> query-replace... as well.
>
> M-:(replace-regexp "\\$\\$" '("\\\[" "\\\]"))

Of course you can call `eval-expression', but I was takling about
commands (interactive functions).

> It is in fact a feature of the perform-replace function.
> Quoting the elisp manual section dealing with this function:

,----[ (info "(elisp)Search and Replace") ]
|  -- Function: perform-replace from-string replacements query-flag
|           regexp-flag delimited-flag &optional repeat-count map start
|           end
|      This function is the guts of `query-replace' and related commands.
|      [...]
| 
|      The argument REPLACEMENTS specifies what to replace occurrences
|      with.  If it is a string, that string is used.  It can also be a
|      list of strings, to be used in cyclic order.
`----

Thanks.

However, IMHO this neat feature should be available interactively
(maybe it is?) and the documentation should not be hidden in (info
"(elisp)Search and Replace") under the internal function
`perform-replace'.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/


  reply	other threads:[~2008-08-16 15:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15  7:29 Then how to replace all my $$ ... $$ to \[ \] through search and replace? xiaopeng hu
2008-08-15  7:54 ` Tassilo Horn
     [not found] ` <mailman.16764.1218786903.18990.help-gnu-emacs@gnu.org>
2008-08-15  8:40   ` Ralf Angeli
2008-08-15  9:05     ` Tassilo Horn
2008-08-15  9:08     ` Thierry Volpiatto
     [not found]     ` <mailman.16770.1218791143.18990.help-gnu-emacs@gnu.org>
2008-08-15  9:34       ` Phil Carmody
2008-08-15 10:13         ` Ralf Angeli
2008-08-15 17:24           ` Reiner Steib
2008-08-16  1:18             ` Nikos Apostolakis
2008-08-16  9:21               ` Reiner Steib
2008-08-16 13:49                 ` harven
2008-08-16 15:45                   ` Reiner Steib [this message]
     [not found] <mailman.16760.1218785698.18990.help-gnu-emacs@gnu.org>
2008-08-15  8:01 ` Xah
2008-08-15 14:25 ` Malte Spiess

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=87ljyx3qws.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    --cc=help-gnu-emacs@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.
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).