From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: hide-show mode: unbalanced parentheses Date: Fri, 05 Jan 2007 00:10:37 -0500 Message-ID: References: <1167965857.446927.38250@42g2000cwt.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1167975633 22613 80.91.229.12 (5 Jan 2007 05:40:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Jan 2007 05:40:33 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 05 06:40:31 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H2hod-0003Dq-Ao for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jan 2007 06:40:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H2hoc-000579-KY for geh-help-gnu-emacs@m.gmane.org; Fri, 05 Jan 2007 00:40:30 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.umontreal.ca!news.umontreal.ca.POSTED!not-for-mail Original-NNTP-Posting-Date: Thu, 04 Jan 2007 23:10:37 -0600 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) Cancel-Lock: sha1:avLVI4hHaW63/lUlFgNWV8ZYu1I= Original-Lines: 25 Original-NNTP-Posting-Host: 132.204.27.213 Original-X-Trace: sv3-kLtWEMqB85FjVobc81qbb7P+DBFTdqWP2l5PwV1F2EcSXAIBC2n6R76cPZXUXhCQnvMhN8IlKhq3420!2xXpoRBnf3538alMoTUZlSDwWDkbXhC6FGsmzbpv3ozviTFIaFqRecfN3TCtIHLt9Uc3T/GmhQHs!aKZEiNpQ1OJ37+IL/A== Original-X-Complaints-To: abuse@umontreal.ca X-DMCA-Complaints-To: abuse@umontreal.ca X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Original-Xref: shelby.stanford.edu gnu.emacs.help:144540 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40144 Archived-At: > 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