I'm using Outline mode (usually the minor mode, but it shouldn't matter) or Org mode. I have a file that looks like this:
-*-outline-*-
* Chapter 1
** Section 1.1
*** Subsection 1.1.1
foo
*** Subsection 1.1.2
bar
** Section 1.2
baz
* Chapter 2
** Section 2.1
qux
** Section 2.2
wib
I'm editing subsection 1.1.1 (“foo”). I want to focus on this section, so I run C-c C-o
(hide-other
). This is what I see:
-*-outline-*-
* Chapter 1
** Section 1.1
*** Subsection 1.1.1
foo...
* Chapter 2...
In the old days of Emacs 19 (the behavior changed after 19.34 and before 20.7), I saw this:
-*-outline-*-
* Chapter 1
** Section 1.1
*** Subsection 1.1.1
foo
*** Subsection 1.1.2...
** Section 1.2...
* Chapter 2...
The difference is that the headers for Section 1.2 and Subsection 1.1.2 are shown, because they're a sibling of Section 1.1 which contains Subsection 1.1.1 which I'm viewing. I like that. How can I get this behavior in a modern Emacs?
What I'm mainly looking for is a way to make hide-other
(or a separate command) show all siblings of all visible headers (if I'm in Subsection 1.1.1, I want to see the headers for Section 1.2 and Subsection 1.1.2, and so on). More generally, I'd like a command outline-show-all-siblings-of-visible-headers
. Is there such a thing?