From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
To: Seweryn Kokot <skokot@po.opole.pl>
Cc: help-gnu-emacs@gnu.org
Subject: Re: what can I do with regexp match?
Date: Mon, 14 May 2007 14:42:10 +0200 [thread overview]
Message-ID: <46485922.1010608@gmail.com> (raw)
In-Reply-To: <87ps53zin6.fsf@poczta.po.opole.pl>
Seweryn Kokot wrote:
> 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?
(match-string 1) ;; At least in Emacs 22
next prev parent reply other threads:[~2007-05-14 12:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 12:36 what can I do with regexp match? Seweryn Kokot
2007-05-14 12:42 ` Lennart Borgman (gmail) [this message]
2007-05-14 13:17 ` Seweryn Kokot
2007-05-14 15:09 ` Lennart Borgman (gmail)
2007-05-14 17:07 ` Seweryn Kokot
2007-05-14 17:14 ` Lennart Borgman (gmail)
2007-05-14 17:46 ` Seweryn Kokot
2007-05-14 15:36 ` Michaël Cadilhac
[not found] ` <mailman.649.1179157491.32220.help-gnu-emacs@gnu.org>
2007-06-09 22:01 ` Stefan Monnier
[not found] <mailman.635.1179146680.32220.help-gnu-emacs@gnu.org>
2007-05-14 17:38 ` David Kastrup
2007-05-14 20:17 ` Seweryn Kokot
2007-05-14 20:33 ` Lennart Borgman (gmail)
2007-05-14 19:01 ` Ralf Angeli
2007-05-14 20:06 ` Seweryn Kokot
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46485922.1010608@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=skokot@po.opole.pl \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.