"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
Now my function is:
(defun my-document-files ()
"Open all document files"
(interactive)
(while (re-search-forward "\\\\include{\\(.*\\)}")
(find-file (concat "~/" (match-string 1) ".tex"))))
why it failed although I have much more occurences of \include{...} in
the main.tex file? Any idea?
Read the documentation for find-file.
Ok I see the problem I wonder if it would be better first to read a
buffer to a variable, then to search regexp, then assign matches to a
list and finally visit files from the list using dolist? But the problem
is how to create a list from regexp matches?