GNU bug report logs - #65750
12.2; LaTeX-mark-section and LaTeX-section-list

Previous Next

Package: auctex;

Reported by: Janet Chen <jjchen <at> math.harvard.edu>

Date: Tue, 5 Sep 2023 02:25:02 UTC

Severity: normal

Tags: wontfix

Found in version 12.2

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

Bug is archived. No further changes may be made.

Full log


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

From: Janet Chen <jjchen <at> math.harvard.edu>
To: Ikumi Keita <ikumi <at> ikumi.que.jp>
Cc: 65750 <at> debbugs.gnu.org
Subject: Re: bug#65750: 12.2; LaTeX-mark-section and LaTeX-section-list
Date: Thu, 7 Sep 2023 12:35:03 +0000
[Message part 1 (text/plain, inline)]
Dear Ikumi,

This works for me; thank you!

Best,
Janet

On Thu, Sep 7, 2023 at 5:56 AM Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:

> Hi Janet,
>
> >>>>> Janet Chen <jjchen <at> math.harvard.edu> writes:
> > I've added a custom section to LaTeX-section-list, but
> LaTeX-mark-section ignores it. This may be the intended behavior, but I
> think it would make more sense for it to mark sections based on the entries
> in LaTeX-section-list.
> > In case it matters, here's the buffer local value of my
> LaTeX-section-list:
> > (("part" 0)
> >  ("chapter" 1)
> >  ("section" 2)
> >  ("nsection" 2)
> >  ("subsection" 3)
> >  ("subsubsection" 4)
> >  ("paragraph" 5)
> >  ("subparagraph" 6))
>
> Sorry for inconvenience. I assume you have file local variable section
> like this:
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% LaTeX-section-list: (("part" 0) ("chapter" 1) ("section" 2)
> ("nsection" 2) ("subsection" 3) ("subsubsection" 4) ("paragraph" 5)
> ("subparagraph" 6))
> %%% End:
>
> For a tentative workaround, add the following code block in your init
> file (~/.emacs.d/init.el) and try it out:
> (add-hook 'LaTeX-mode-hook
>           (lambda ()
>             (add-hook 'hack-local-variables-hook
>                       (lambda ()
>                         (setq-local outline-regexp (LaTeX-outline-regexp
> t))
>                         (setq outline-heading-alist
>                               (mapcar (lambda (x)
>                                         (cons (concat "\\" (nth 0 x)) (nth
> 1 x)))
>                                       LaTeX-section-list)))
>                       nil t)))
>
> To developers:
> `LaTeX-common-initialization' sets up some variables including
> `outline-regexp' and `outline-heading-alist' before `run-mode-hooks',
> which is responsible for parsing and applying the file local variables.
> Shouldn't we move such set-up codes after `run-mode-hooks'? (And if so,
> similar argument applies for other AUCTeX major modes as well.)
>
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
>
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 149 days ago.

Previous Next


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