help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what can I do with regexp match?


From: Seweryn Kokot
Subject: Re: what can I do with regexp match?
Date: Mon, 14 May 2007 22:17:14 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

David Kastrup <dak@gnu.org> writes:

> Seweryn Kokot <skokot@po.opole.pl> 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 ?

I'm a newbie with emacs lisp so I cannot see how it can apply to my
case. Writing an elisp function I'm learning elisp, but it seems that
reftex-query-replace-document is only interactive or am I wrong?







reply via email to

[Prev in Thread] Current Thread [Next in Thread]