Subject: Re: bug#46878: 27.1; lisp-outline-level returns imprecise level number

From: Juri Linkov <[email-masked]>
Date: Mon, 08 Mar 2021 19:23:58 +0200

>> I tried to use your new definition, but noticed that
>> it adds a new cycling state: while using outline-cycle-buffer
>> previously it used to cycle between only two states
>> (thus it was convenient to collapse/expand all headings
>> with only one keypress S-TAB).
>>
>> But with your change, it requires typing S-TAB twice
>> to get the state where all headings are shown and
>> their bodies are collapsed, because it cycles
>> between three states.
>
> Hmmm. Yes I have that, but I always had that in emacs-lisp-mode
> even before this change.  The cycle commands cycle between
> three states (top level, all headings and everything) and as I
> understand it, it's just a function of how many levels are defined,
> not what numbers they are called.

This is strange.  When trying this in emacs -Q and visiting
a Emacs-Lisp file from the emacs repository and typing:

  M-x outline-minor-mode RET

Then using repeatedly:

  M-x outline-cycle-buffer RET

It consistently alternates between only two states:

  Show all
  All headings

But after evaluating your version of lisp-outline-level,
it alternates between three states:

  Show all
  Top level headings
  All headings