all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: carsten_dominik@web.de
Subject: Re: display reftex-toc automatically
Date: 13 Jun 2005 13:55:05 -0700	[thread overview]
Message-ID: <1118696105.511976.64330@f14g2000cwb.googlegroups.com> (raw)
In-Reply-To: <slrndaqous.152.fab@node1.ddorf.de>



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)))))

- Carsten

  reply	other threads:[~2005-06-13 20:55 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 [this message]
2005-06-16  6:48   ` Fabian Braennstroem

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=1118696105.511976.64330@f14g2000cwb.googlegroups.com \
    --to=carsten_dominik@web.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.