From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: Then how to replace all my $$ ... $$ to \[ \] through search and replace? Date: Sat, 16 Aug 2008 17:45:07 +0200 Organization: T-Online Message-ID: <87ljyx3qws.fsf@marauder.physik.uni-ulm.de> References: <48a540fe$0$11744$9b4e6d93@newsspool1.arcor-online.net> <87ej4qmxk6.fsf@nonospaz.fatphil.org> <48a556d2$0$11740$9b4e6d93@newsspool1.arcor-online.net> <87bpzu8a3y.fsf@marauder.physik.uni-ulm.de> <87vdy13ggr.fsf@Sullivan.bcc.cuny.edu> <87k5eh71tn.fsf@marauder.physik.uni-ulm.de> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1218904852 12252 80.91.229.12 (16 Aug 2008 16:40:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Aug 2008 16:40:52 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 16 18:41:44 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KUOqN-0006Ln-55 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 18:41:35 +0200 Original-Received: from localhost ([127.0.0.1]:35642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUOpQ-0004TY-LL for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 12:40:36 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-X-Trace: news.t-online.com 1218904386 02 n5715 yHa3OAklNpnD0CA 080816 16:33:06 Original-X-Complaints-To: usenet-abuse@t-online.de X-ID: EBOqIaZaoegbnew3efdoPS3wrOqZxUdeI+35RmWDdTAlnHp-1R4ygX X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY; Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m, tWj]&}, qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi, +g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ Mail-Copies-To: nobody User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:OLN+v1TNrPyul9eVnHbZQwSq7ZE= Original-Xref: news.stanford.edu gnu.emacs.help:161376 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56722 Archived-At: 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/