Subject: Re: bug#62278: 28.2; Outline in DocTeX mode

From: Arash Esbati <[email-masked]>
Date: Sat, 25 Mar 2023 22:35:44 +0100

Jan Braun <[email-masked]> writes:

>  When I start Emacs with 'emacs -Q', open the file above, do
>  'M-x outline-minor-mode RET' followed by 'C-c @ C-t', this is what I
>  see:
>  Or do you expect something else?
>
> No, no, this is exactly, what I would like to see and work on.  
>
> Unfortunately, I get this result:

I see that I missed to say that the exact steps were:

  • Start Emacs with 'emacs -Q'
  • Paste this code into scratch buffer and eval it (it is the same code
    as in my last message)

     (with-eval-after-load "tex-mode"
       (add-hook 'doctex-mode-hook
                 (lambda ()
                   (setq-local latex-outline-regexp
                               (concat "[% \t]*" "\\\\"
                                       (regexp-opt
                                        (append latex-metasection-list
                                                (mapcar #'car latex-section-alist))
                                        t)))
                   (setq-local outline-regexp latex-outline-regexp))))

  • Open the .dtx file in my other message
  • Do 'M-x outline-minor-mode RET'
  • Do 'C-c @ C-t'

This is with Emacs30 (997a8dbc48).  If this doesn't work for you, I'm
out of ideas.

Best, Arash