[Top][All Lists]

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

[Bug-AUCTeX] 2009-12-12; Fix a bug in LaTeX-outline-level

From: Leo
Subject: [Bug-AUCTeX] 2009-12-12; Fix a bug in LaTeX-outline-level
Date: Fri, 22 Jan 2010 23:43:50 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (darwin)

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.

Be sure to consult the FAQ section in the manual before submitting
a bug report.  In addition check if the bug is reproducable with an
up-to-date version of AUCTeX.  So please upgrade to the version
available from http://www.gnu.org/software/auctex/ if your
installation is older than the one available from the web site.

If the bug is triggered by a specific (La)TeX file, you should try
to produce a minimal sample file showing the problem and include it
in your report.

Your bug report will be posted to the AUCTeX bug reporting list.

LaTeX-outline-level throws an error when outline-regexp is customised,
something one easily runs into when doing multiple-file LaTeX project.
For example you may have your preamble in a separate file and use
outline-minor-mode to organise the code. The default value of
outline-regexp makes no sense in these cases. This bug also prevents
org-narrow-to-subtree from working.

The attached patch passes the handling to function outline-level instead
of throwing an error. Thus it works well when outline-regexp has been
customised (for example in file local variables.).

--- a/latex.el.gz
+++ b/latex.el.gz~
@@ -314,8 +314,7 @@
                ((TeX-look-at LaTeX-section-list)
                 (max 1 (+ (TeX-look-at LaTeX-section-list)
-               (t
-                (error "Unrecognized header")))))))
+               (t (outline-level)))))))
 (defun LaTeX-outline-name ()
   "Guess a name for the current header line."

Diff finished.  Fri Jan 22 23:21:31 2010

Emacs  : GNU Emacs of 2010-01-01
Package: 2009-12-12

reply via email to

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