[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Then how to replace all my $$ ... $$ to \[ \] through search and rep
From: |
harven |
Subject: |
Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace? |
Date: |
Sat, 16 Aug 2008 06:49:50 -0700 (PDT) |
User-agent: |
G2/1.0 |
> 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 "\\$\\$" '("\\\[" "\\\]"))
It is in fact a feature of the perform-replace function.
Quoting the elisp manual section dealing with this function:
> 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.
> If REPLACEMENTS is a cons cell, `(FUNCTION . DATA)', this means to
> call FUNCTION after each match to get the replacement text. This
> function is called with two arguments: DATA, and the number of
> replacements already made.
- Then how to replace all my $$ ... $$ to \[ \] through search and replace?, xiaopeng hu, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Tassilo Horn, 2008/08/15
- Message not available
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Ralf Angeli, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Tassilo Horn, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Thierry Volpiatto, 2008/08/15
- Message not available
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Phil Carmody, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Ralf Angeli, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Reiner Steib, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Nikos Apostolakis, 2008/08/15
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Reiner Steib, 2008/08/16
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?,
harven <=
- Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace?, Reiner Steib, 2008/08/16