Subject: bug#64227: closed (Re: bug#64177: outline-minor-mode-highlight fails to activate for custom headings)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 25 Jun 2023 17:28:03 +0000

Your bug report

#64177: Setting of outline levels for custom headings

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
64177: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64177
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#64177: outline-minor-mode-highlight fails to activate for custom headings
From: Juri Linkov <[email-masked]>
To: uzibalqa <[email-masked]>
Cc: [email-masked]
Date: Sun, 25 Jun 2023 20:13:31 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> How does emacs-lisp-mode handle outline headings ?  Always setting the
> defaults first, then the user can reset the variables outline-regexp,
> outline-heading-alist, and outline-level before enabling outline-minor-mode ?

Yes, you need to set the variables outline-regexp, outline-heading-alist,
and outline-level before enabling outline-minor-mode.

Since you have a working solution now, I'm closing this request.

Subject: Setting of outline levels for custom headings
From: uzibalqa <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Thu, 22 Jun 2023 16:18:59 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

I am using outline-minor-mode and have changed outline-regexp, outline-heading-alist.

Have seen that for some major modes (e.g. emacs-lisp-mode), with outline-minor-mode-highlight
set to 'override  nil), one has to call (setq-local outline-level 'outline-level) for the 
heading faces to take effect.

But without the call to outline-minor-mode-highlight, the headings defined by outline-regexp
still get recognised, but not the outline levels.

It is not evident at this point, which major modes require a call to (setq-local outline-level 'outline-level).
There is not enough information in the documentation to get a custom headings setup operational.

Furthermore, although a call to (setq-local outline-level 'outline-level) solved the problem,
a better approach would be for outline-minor-mode to automatically detect whether a custom heading
was specified, and thus act accordingly.  It would be quite a struggle for people to perceive the
need to call (setq-local outline-level 'outline-level), as the change is only needed for certain
major modes only.