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


View this message in rfc822 format

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: 65750 <at> debbugs.gnu.org
Subject: bug#65750: 12.2; LaTeX-mark-section and LaTeX-section-list
Date: Fri, 08 Sep 2023 16:23:32 +0900
Hi Tassilo,

>>>>> Tassilo Horn <tsdh <at> gnu.org> writes:
> That sounds reasonable in the current case.  OTOH, it could be that
> users set things like outline-regexp in those mode-hooks which would
> then be overridden by our set-up code if that ran after the hooks...

Hmm, how about adding locally-bound test like this?
(defun TeX-latex-mode ()
...
  (LaTeX-common-initialization)
...
  (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'LaTeX-mode-hook)
...
  (or (local-variable-p 'outline-regexp)
      (setq-local outline-regexp (LaTeX-outline-regexp t))
  (or (local-variable-p 'outline-heading-alist)
      (setq outline-heading-alist
        (mapcar (lambda (x)
          (cons (concat "\\" (nth 0 x)) (nth 1 x)))
             LaTeX-section-list)))
...

(I noticed that this doesn't work as expected for doctex-mode because
`run-mode-hooks' doesn't run hooks and `hack-local-variables' when
latex-mode is called as parent of doctex-mode. We need to switch to
"feature/fix-mode-names-overlap" branch, to define all major modes by
`define-derived-mode', for clean solution.)

Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine




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.