bug#81590: 32.0.50; speedbar does not work well with multi-line tags
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
> From: Adam Niederer <[email protected]> > Date: Sun, 9 Aug 2026 12:51:37 -0400 > > 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 TBH, I'd be interested to hear how did you even know what to expect from these two commands. Their documentation leaves that completely unexplained. Any Speedbar experts on the house? > 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.