The recursive-narrow package
https://github.com/nflath/recursive-narrow/tree/master
Thanks to @maxfriis for bringing it to my attention
What is it?
The recursive-narrow package is an enhancement of the native Emacs narrowing functionality, which allows users to focus on a specific part of a document or buffer, hiding the rest.
What does it do? It extends the built-in narrowing capabilities by allowing for recursive narrowing. This means you can narrow down to a specific part of a document, and then within that narrowed view, you can narrow down further to an even more specific part. This recursive approach enables a more focused and granular level of working with documents or code.
Why would you want it? `recursive-narrow' helps reduce clutter and distractions, making it easier to read or edit specific parts of your files.
How does it work?
(require 'recursive-narrow)
What are the Main Commands?
recursive-widen (C-x n w)
recursive-narrow-to-defun
recursive-narrow-to-region
recursive-narrow-or-widen-dwim (C-x n n)