GNU bug report logs - #59638
13.0.9; reftex-toc counts incorrectly if section is commented out

Previous Next

Package: auctex;

Reported by: Uwe Brauer <oub <at> mat.ucm.es>

Date: Sun, 27 Nov 2022 17:27:02 UTC

Severity: normal

Found in version 13.0.9

Done: Arash Esbati <arash <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tassilo Horn <tsdh <at> gnu.org>
To: Uwe Brauer <oub <at> mat.ucm.es>
Cc: bug-auctex <at> gnu.org, 59638 <at> debbugs.gnu.org
Subject: Re: bug#59638: 13.0.9; reftex-toc counts incorrectly if section is
 commented out
Date: Mon, 28 Nov 2022 07:00:22 +0100
Uwe Brauer <oub <at> mat.ucm.es> writes:

Hi Uwe,

> \section{First}
> %\section{Second}
> \section{Third}
>
> \end{document}
>
> reftex-toc
>
> Results in 
>
>      1 First
>      3 Third
>
> Which is wrong, the counting should give 
>
> 1 First
> 2 Third
>
> It gets worse if the document contains a lot of commented out sections.
> Any idea what to do?

I'd call it a feature.  I mean, when you have commented out sections,
you'll most probably intend to uncomment them again.  Otherwise, you
could just delete them, no?

Anyway, you could also try to change reftex-section-pre-regexp from
"\\\\" to "[^%]+[ \t]*\\\\" which might do the trick.

Bye,
Tassilo




This bug report was last modified 2 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.