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

From: Jan Braun <[email-masked]>
Date: Mon, 27 Mar 2023 11:58:50 +0200

Hi Arash,

> Am 27.03.2023 um 09:50 schrieb Arash Esbati <[email-masked]>:
> 
> Jan Braun <[email-masked]> writes:
> 
>> Done that and: eh voila: It worked on your example DTX file, as 
>> well as on my DTX files, I am actually working on.
> 
> Thanks for the confirmation.

You are more than welcome.

>> Do you have any suggestions, how to make that code work 
>> automagically on Emacsens startup?
> 
> Add that lisp snippet to your init file and you should be fine.

As you might remember: that was the starting point.  As I wrote 
in my message from 2023-03-12, 09:45

>> Emacs complains
>> 
>> Debugger entered--Lisp error: (void-variable latex-outline-regexp)
>> (set (make-local-variable 'outline-regexp) latex-outline-regexp)
>> (add-hook 'doctex-mode-hook #'(lambda nil (set (make-local-variable 'latex-outline-regexp) (concat "[% \11]*" "\\\\" (regexp-opt (append latex-metasection-list (mapcar ... latex-section-alist)) t)))) (set (make-local-variable 'outline-regexp) latex-outline-regexp))
>> eval-buffer(#<buffer  *load*> nil "/Users/tmjb/.emacs" nil t)  ; Reading at buffer position 30847
>> load-with-code-conversion("/Users/tmjb/.emacs" "/Users/tmjb/.emacs" t t)
>> load("~/.emacs" noerror nomessage)
>> startup--load-user-init-file(#f(compiled-function () #<bytecode -0x148e3df754d535f>) #f(compiled-function () #<bytecode -0x1f3c686ddc0d6275>) t)
>> command-line()
>> normal-top-level()

Your fix only works in a plain Emacsen, being started without 
any kind of init file. :-(

So, in principle, your fix works, but not, if I place it in my 
init file.

Bye

 Jan

-- 
Jan Braun (er/ihm)
[email-masked]

=== ypchsh /usr/local/bin/emacs === go FORTH now … ===