Skip to main content
added an example with an extra level as requested; made the example more uniform by not swapping between 1 and 2 at each level
Source Link

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 barbaz * Chapter 2 ** Section 2.1 qux ** Section 2.2 wib 

I'm editing sectionsubsection 1.21.1 (“bar”“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.21 bar*** 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 bar... * Chapter 2... 

The difference is that the headers for Section 1.2 and Subsection 1.1 is.2 are shown, because it'sthey're a sibling of Section 1.21 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.21.21, I want to see the headers for Section 1.2 and Subsection 1.2.1.2, and so on). More generally, I'd like a command outline-show-all-siblings-of-visible-headers. Is there such a thing?

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 foo ** Section 1.2 bar * Chapter 2 ** Section 2.1 qux ** Section 2.2 wib 

I'm editing section 1.2 (“bar”). 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.2 bar * 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... ** Section 1.2 bar * Chapter 2... 

The difference is that Section 1.1 is shown, because it's a sibling of Section 1.2 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.2.2, I want to see Section 1.2 and Subsection 1.2.1, and so on). More generally, I'd like a command outline-show-all-siblings-of-visible-headers. Is there such a thing?

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?

Source Link

Show siblings of visible headers after hide-other

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 foo ** Section 1.2 bar * Chapter 2 ** Section 2.1 qux ** Section 2.2 wib 

I'm editing section 1.2 (“bar”). 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.2 bar * 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... ** Section 1.2 bar * Chapter 2... 

The difference is that Section 1.1 is shown, because it's a sibling of Section 1.2 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.2.2, I want to see Section 1.2 and Subsection 1.2.1, and so on). More generally, I'd like a command outline-show-all-siblings-of-visible-headers. Is there such a thing?