bug#81590: 32.0.50; speedbar does not work well with multi-line tags
Adam Niederer <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <CAALAvQXBE78ip1cNZ5rRYbHZeO9Wybja=UHf1UCSvr-HozCjYg@mail.gmail.com> |
Repro Steps:
- $ cat << 'EOF' > a.el
(setq-local imenu-create-index-function (lambda () `(("Hidden
Correctly\nNot Hidden!" . ,(point-min)))))
EOF
- $ emacs -Q a.el
- M-x eval-buffer
- M-x speedbar
- Move point to a.el in the speedbar frame
- M-x speedbar-expand-line
- M-x speedbar-contract-line
Expected Behavior:
- speedbar-contract-line hides both "Hidden Correctly" and "Not Hidden!"
Observed Behavior:
- speedbar-contract-line only hides "Hidden Correctly", leaving "Not Hidden!"
- Repeating speedbar-expand-line and speedbar-contract-line causes more "Not
Hidden!" lines to pile up below a.el
This is common with CSS files, as imenu will create multi-line tags for
selectors like:
button,
input[type="submit"] {
}
Also, subsequent lines of the tag are not indented to the level of the first:
> Hidden Correctly
Not Hidden!
May be a matter of preference, but I think:
> Hidden Correctly
Not Hidden!
would look nicer.
Finally, if you expand a.el for the first time and click "Hidden Correctly", it
will bring you to the first line of a.el as expected. clicking "Not Hidden!"
will instead bring you to the first line of a dired buffer of the folder in
which a.el resides. This is also the case for "Not Hidden!" lines that have
piled up due to repeated expansion and contraction.
In GNU Emacs 32.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.52, cairo version 1.18.4) of 2026-08-07 built on pc
Repository revision: a3d43a12a4060430c92145e4c53431ccf20bae58
Repository branch: master
System Description: Arch Linux
Configured using:
'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
--localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
--with-modules --without-m17n-flt --without-gconf
--with-native-compilation=yes --with-native-compilation=aot
--with-xinput2 --with-pgtk --without-xaw3d --with-sound=no
--with-tree-sitter 'CFLAGS=-march=native -mtune=native -O2 -pipe
-fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat
-Werror=format-security -fstack-clash-protection -fcf-protection'
LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
LCMS2 LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=fcitx5
locale-coding-system: utf-8-unix
Major mode: Elisp/d
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-nonselected-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug lisp-mnt message mailcap yank-media puny
dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg
rfc6068 epg-config gnus-util text-property-search mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader sendmail mail-parse rfc2231
rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date
subr-x mule-util imenu speedbar ezimage dframe comp-run bytecomp
byte-compile comp-common rx warnings icons cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win
term/common-win touch-screen pgtk-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine 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 emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
lcms2 multi-tty move-toolbar make-network-process tty-child-frames
native-compile emacs)
Memory information:
((conses 16 64051 12330) (symbols 48 6714 0) (strings 32 16680 2261)
(string-bytes 1 590863) (vectors 16 10733)
(vector-slots 8 156759 7268) (floats 8 28 118) (intervals 56 322 1)
(buffers 1064 13))