Subject: bug#37211: 26.2; outline-hide-sublevels works incorrectly in lisp (elisp, scheme) modes -- hides everything regardless of the level

From: Vladimir Nikishkin <[email-masked]>
Date: Wed, 28 Aug 2019 23:37:19 +0800

I tested this with `emacs -Q'.
Steps to produce:

1. Visit a lisp file, such as
/usr/share/emacs/26.2/lisp/char-fold.el.gz
2. Type M-x outline-minor-mode
3. Type M-x outline-hide-sublevels

Observe that almost everything is hidden, not just sexps under level 1.
This works even though M-: (outline-level) returns 1 for most of the
lines.

Steps to reproduce 2:
1. Visit a lisp file, such as
/usr/share/emacs/26.2/lisp/char-fold.el.gz
2. Type M-: (outline-hide-sublevels 1)
3. Observe that even more is hidden (everything), even more than in the
previous case.

Why exactly this happens, I am not sure.

Cheers, Lockywolf

In GNU Emacs 26.2 (build 1, x86_64-slackware-linux-gnu, GTK+ Version 3.24.10)
 of 2019-07-18 built on hive64.slackware.lan
Windowing system distributor 'The X.Org Foundation', version 11.0.12005000
Recent messages:
Desktop lazily opening .emacs (7 remaining)...done
Desktop lazily opening test.el (6 remaining)...done
Desktop lazily opening editfns.c (5 remaining)...done
Desktop lazily opening geiser-connection.el (4 remaining)...done
Desktop lazily opening geiser-eval.el (3 remaining)...done
Desktop lazily opening geiser-popup.el (2 remaining)...done
Desktop lazily opening index.org (1 remaining)...
Creating images for buffer...done
Desktop lazily opening index.org (1 remaining)...done
Lazy desktop load complete

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
--program-prefix= --program-suffix= --mandir=/usr/man
--infodir=/usr/info --without-gconf --without-gsettings --with-x
--with-x-toolkit=gtk3 --build=x86_64-slackware-linux 'CFLAGS=-O2 -fPIC''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GLIB NOTIFY ACL
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
THREADS LCMS2

Important settings:
  value of $LC_COLLATE: C
  value of $LC_TIME: en_GB.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=SCIM
  locale-coding-system: utf-8-unix

Major mode: Scheme

Minor modes in effect:
  geiser-mode: t
  geiser-autodoc-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  auto-insert-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  global-auto-revert-mode: t
  electric-pair-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  global-hi-lock-mode: t
  hi-lock-mode: t
  ido-everywhere: t
  outline-minor-mode: t
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-layout-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  global-prettify-symbols-mode: t
  prettify-symbols-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-custom hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-custom
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-image hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-image
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-doc hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-doc
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-debug hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-debug
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-chicken hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-chicken
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-connection hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-connection
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-chibi hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-chibi
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-popup hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-popup
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-edit hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-edit
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-guile hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-guile
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-eval hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-eval
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-impl hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-impl
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-base hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-base
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-repl hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-repl
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-mode hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-mode
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-reload hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-reload
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-chez hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-chez
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-menu hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-menu
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-racket hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-racket
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-autodoc hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-autodoc
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-log hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-log
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-xref hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-xref
/home/lockywolf/OfficialRepos/geiser/elisp/geiser hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-completion hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-completion
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-syntax hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-syntax
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-version hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-version
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-mit hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-mit
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-table hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-table
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-company hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-company
/home/lockywolf/OfficialRepos/geiser/elisp/geiser-compile hides /home/lockywolf/.emacs.d/elpa/geiser-20190624.1807/geiser-compile
/home/lockywolf/.emacs.d/elpa/company-cmake-0.1/company-cmake hides /home/lockywolf/.emacs.d/elpa/company-20190430.1852/company-cmake

Features:
(shadow sort mail-extr macrostep-c cmacexp macrostep pp emacsbug imenu
flyspell ispell org-duration image-file org-table org-rmail org-mhe
org-irc org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range message rmc puny rfc822 mml
mml-sec epa epg mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus nnheader gnus-util rmail
rmail-loaddefs org-docview doc-view image-mode dired dired-loaddefs
org-bibtex bibtex org-bbdb org-w3m pcase jka-compr geiser-mode
geiser-xref geiser-compile geiser-debug geiser-gambit geiser-chibi
geiser-mit geiser-chez geiser-chicken geiser-racket geiser-guile
info-look geiser-repl geiser-image geiser-company geiser-doc geiser-menu
geiser-edit etags xref project geiser-completion geiser-autodoc
geiser-eval geiser-connection tq geiser-syntax cl geiser-log derived
geiser-popup view scheme flycheck-plantuml plantuml-mode flycheck json
map rx subr-x dash outline-magic autoinsert auctex-latexmk tex-buf latex
latex-flymake flymake-proc flymake compile warnings tex-ispell tex-style
tex cl-extra eieio-opt speedbar sb-image ezimage dframe crm reftex
reftex-loaddefs reftex-vars smtpmail sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils starttls autorevert filenotify elec-pair
keywiz gamegrid diary-lib diary-loaddefs totd display-line-numbers
hi-lock secrets dbus ido-completing-read+ memoize s cus-edit cus-start
cus-load wid-edit minibuf-eldef ido xml ox-md ox-odt rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox ob-scheme geiser-impl help-fns radix-tree help-mode
geiser-custom geiser-base ob-C cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs ob-plantuml
org-element avl-tree generator org advice org-macro org-footnote
org-pcomplete pcomplete org-list org-faces org-entities foldout noutline
outline easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref
ob-lob ob-table ob-keys ob-exp ob-comint comint ansi-color ring ob-core
ob-eval org-compat org-macs org-loaddefs format-spec find-func cal-menu
calendar cal-loaddefs mic-paren ffap thingatpt edmacro kmacro savehist
desktop frameset geiser manoj-dark-theme finder-inf tex-site gh-common
marshal eieio-compat org2blog-autoloads slime-autoloads info package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date mule-util
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 457360 29854)
 (symbols 48 50799 2)
 (miscs 40 1399 2503)
 (strings 32 139004 21855)
 (string-bytes 1 4412585)
 (vectors 16 57330)
 (vector-slots 8 1654447 207342)
 (floats 8 305 477)
 (intervals 56 1506 109)
 (buffers 992 37))

-- 
--
Vladimir Nikishkin (MiEr, lockywolf)