auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [AUCTeX] TeX-outline-regexp


From: Ralf Angeli
Subject: Re: [AUCTeX] TeX-outline-regexp
Date: Mon, 21 Aug 2006 19:36:20 +0200

* Martin Rud Ehmsen (2006-08-21) writes:

> Ralf Angeli wrote:
>> Assuming the following LaTeX file:
>> 
>> \documentclass{article}
>> \begin{document}
>> \begin{foo}
>>   bar
>> \end{foo}
>> \end{document}
>> 
>> If I activate Outline minor mode with `M-x outline-minor-mode RET',
>> place point at the beginning of the line with "bar" and type `M-x
>> hide-entry RET', an ellipsis appear after "\begin{foo}" and the two
>> lines before "\end{document}" are collapsed.
>
> That does not work for me :-(
> The relevant subset of my .emacs is:
>
>   (setq TeX-auto-save t)
>   (setq TeX-parse-self t)

Why do you set the above in the mode hook?

>   (outline-minor-mode 1)
>   (hide-sublevels 1)
>
> which is called from a function which i hook into LaTeX-mode-hook.
> I use several other modes when TeX'ing, do you think they can interfere?

Probably.  You can check this by not using them.

For example, put the following minimal setup into a file, say foo.el.

(load "auctex.el" nil t t)
(setq TeX-outline-extra '(("\\\\begin" 7)))
(add-hook 'LaTeX-mode-hook
          (lambda ()
            (outline-minor-mode 1)
            (hide-sublevels 1)))

Now start Emacs with
emacs -Q -l foo.el yourfile.tex

If I do this with the file shown above I get

\documentclass{article}
\begin{document}...
\end{document}...

as displayed buffer contents.

>> BTW, you might want to have a look at
>> (info "(auctex)Folding") <-- Type `C-x C-e' here.
>> as well, in case you have a moderately recent AUCTeX installation.
>
> I like Folding when I program but not with when TeX'ing :-)

Have you read the info node?  It allows you to collapse LaTeX
environments, which is what you want to achieve AFAIU.

-- 
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]