Hi Carsten,
On 2005-06-13, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Fabian Braennstroem schrieb:
> > Hi,
> >
> > I would like to display the reftex-toc automatically when I open an
> > existing tex-file. It would be nice if the automatic start just works
> > for an 'article' (and similark class and not for any letter-class.
> > Do you have any idea?
> >
>
> Untested:
>
>
> (add-hook 'reftex-mode-hook
> (lambda ()
> (let ((class (save-excursion
> (goto-char (point-min))
> (if (re-search-forward
> "\\documentclass.*?{\\([^}]+\\)}" nil t)
> (match-string 1)))))
> (if (member class '("article" "book" "report"))
> (reftex-toc)))))
Thanks! Tested it now. Unfortunately it doesn't work.
I get:
Loading /home/fab/HOME/HomePage/latex_dissertation.rel...done
Loading reftex-parse...done
Building *toc* buffer...
Loading reftex-sel...done
Building *toc* buffer...done.
file-name-extension: Wrong type argument: stringp, nil
when I open a tex-file which is an 'article'. For other classes than
book, report and article there is no problem. It seems that the search
for those classes works fine but opening up the toc makes problems.
Maybe, you have a second idea!?
Greetings, Fabian
_______________________________________________
Help-gnu-emacs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs