* hide-show mode: unbalanced parentheses
@ 2007-01-05 2:57 Ryo
2007-01-05 5:10 ` Stefan Monnier
2007-01-05 13:55 ` Tassilo Horn
0 siblings, 2 replies; 4+ messages in thread
From: Ryo @ 2007-01-05 2:57 UTC (permalink / raw)
Hi all,
hs-hide-all (in hs-minor-mode, a "hide-show" mode) gets stuck
with "unbalanced parentheses" in my latex source. 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? Or is there any alternative to hs-minor-mode?
I could imagine that folding is possible on the basis of sectioning
commands like "\section".
Regards,
Ryo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hide-show mode: unbalanced parentheses
2007-01-05 2:57 hide-show mode: unbalanced parentheses Ryo
@ 2007-01-05 5:10 ` Stefan Monnier
2007-01-05 13:55 ` Tassilo Horn
1 sibling, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2007-01-05 5:10 UTC (permalink / raw)
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hide-show mode: unbalanced parentheses
2007-01-05 2:57 hide-show mode: unbalanced parentheses Ryo
2007-01-05 5:10 ` Stefan Monnier
@ 2007-01-05 13:55 ` Tassilo Horn
2007-01-16 0:43 ` furue
1 sibling, 1 reply; 4+ messages in thread
From: Tassilo Horn @ 2007-01-05 13:55 UTC (permalink / raw)
"Ryo" <furufuru@ccsr.u-tokyo.ac.jp> writes:
Hi Ryo,
> Is there any fix? Or is there any alternative to hs-minor-mode? I
> could imagine that folding is possible on the basis of sectioning
> commands like "\section".
If you use AUCTeX, you can use folding.
,----[ (info "(auctex)Folding") ]
| In order to use this feature, you have to activate `TeX-fold-mode'
| which will activate the auto-reveal feature and the necessary commands
| to hide and show macros and environments.
`----
Bye,
Tassilo
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to
produce bigger and better idiots. So far, the Universe is winning.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: hide-show mode: unbalanced parentheses
2007-01-05 13:55 ` Tassilo Horn
@ 2007-01-16 0:43 ` furue
0 siblings, 0 replies; 4+ messages in thread
From: furue @ 2007-01-16 0:43 UTC (permalink / raw)
Hi Tassilo,
> > Is there any fix? Or is there any alternative to hs-minor-mode? I
> > could imagine that folding is possible on the basis of sectioning
> > commands like "\section".
>
> If you use AUCTeX, you can use folding.
Thanks for the info! outline-minor-mode works weill.
But, I'm wondering if there's a better key binding for the prefix
than "C-c @" --- "@" is a bit awkward to press (I have to release
my left little finger from the Ctrl key in order for my left ring
finger to reach the @ key). I'm not asking how to change the
prefix but looking for a good key sequence which doesn't
override other functions.
Cheers,
Ryo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-16 0:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 2:57 hide-show mode: unbalanced parentheses Ryo
2007-01-05 5:10 ` Stefan Monnier
2007-01-05 13:55 ` Tassilo Horn
2007-01-16 0:43 ` furue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).