[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hide-show mode: unbalanced parentheses
From: |
Stefan Monnier |
Subject: |
Re: hide-show mode: unbalanced parentheses |
Date: |
Fri, 05 Jan 2007 00:10:37 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) |
> hs-hide-all (in hs-minor-mode, a "hide-show" mode) gets stuck
> with "unbalanced parentheses" in my latex source.
Try M-x report-emacs-bug. Maybe this can fail more gracefully.
> Some unbalanced
> parens and brackets are necessary. For example,
> \@ifnextchar [{\@tauZero}{\tau_{\!\!o}}
> Notice the unmatched "[" . Or, you sometimes write
> "1) blah blah; 2) blah blah; . . . ."
> Is there any fix?
You can probably try and fool hs-minor-mode by adding dummy matching chars
(typically wrapped in some ad-hoc command, such as \ignore{[} where \ignore
is defined as a nop that takes an arg and throws it away).
Kind of ugly, tho. Sadly, LaTeX is inherently non-structured, although it
happens to be properly structured in 99% of the cases.
> Or is there any alternative to hs-minor-mode? I could imagine that
> folding is possible on the basis of sectioning commands like "\section".
You may want to try outline-minor-mode for that.
Stefan