From: Fabian Braennstroem <fab@ddorf.de>
Subject: Re: display reftex-toc automatically
Date: 16 Jun 2005 06:48:21 GMT [thread overview]
Message-ID: <slrndb28ge.15a.fab@node1.ddorf.de> (raw)
In-Reply-To: 1118696105.511976.64330@f14g2000cwb.googlegroups.com
Hi Carsten,
On 2005-06-13, carsten_dominik@web.de <carsten_dominik@web.de> 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
prev parent reply other threads:[~2005-06-16 6:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 10:40 display reftex-toc automatically Fabian Braennstroem
2005-06-13 20:55 ` carsten_dominik
2005-06-16 6:48 ` Fabian Braennstroem [this message]
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=slrndb28ge.15a.fab@node1.ddorf.de \
--to=fab@ddorf.de \
--cc=f.braennstroem@gmx.de \
/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.