From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: what can I do with regexp match? Date: Mon, 14 May 2007 19:38:15 +0200 Organization: Organization?!? Message-ID: <85zm47fgqg.fsf@lola.goethe.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179167555 8107 80.91.229.12 (14 May 2007 18:32:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 14 May 2007 18:32:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 14 20:32:34 2007 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 1HnfLV-0002Ca-TS for geh-help-gnu-emacs@m.gmane.org; Mon, 14 May 2007 20:32:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HnfTI-0005RH-AR for geh-help-gnu-emacs@m.gmane.org; Mon, 14 May 2007 14:40:36 -0400 Original-Path: shelby.stanford.edu!newshub.stanford.edu!syros.belnet.be!news.belnet.be!feeder.news-service.com!news2.euro.net!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!news.uucp.at!uucp.gnuu.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.51 (gnu/linux) Cancel-Lock: sha1:QRojp4R5PDTDqLXBgHfx2xPaZj4= Original-Lines: 22 Original-NNTP-Posting-Date: 14 May 2007 19:38:11 CEST Original-NNTP-Posting-Host: 7c9b4948.newsspool1.arcor-online.net Original-X-Trace: DXC=EKd@8`Bhmk`fF8a^:6>b7eic==]BZ:afn4Fo<]lROoRaFl8W>\BH3Yb\I=Q_I:hY8aCV`H8_`hhQd^9QSCVg3dOfOIC5DBZVJ9kBbW?@Eg4Uom7ch1k; ^AYob Original-X-Complaints-To: usenet-abuse@arcor.de Original-Xref: shelby.stanford.edu gnu.emacs.help:148388 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:43982 Archived-At: Seweryn Kokot writes: > Hello, > > I would like to have a function that visits all the tex files included > in main.tex file. I wrote the following function: > (defun my-document-files () > "Open all document files" > (interactive) > (while (re-search-forward "\\\\include{\\(.*\\)}") > (find-file (concat "~/nauka/doktorat/thesis/" "\\1" ".tex")))) > > But it doesn't work since \\1 is not replaced by regexp match. The > result is that the function visits \1.tex file. The question is how to > process the regexp match to make it argument for find-file or more > general question how to save the match in a variable or list? You know M-x reftex-query-replace-document RET ? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum