I know I can use the function org-content
to fold all my outlines to specific levels when I'm in org-mode
. That means:
- Using
(org-content 1)
will fold all my org outlines to the first level - Using
(org-content 2)
will fold all my org outlines until the second level - Using
(org-content 3)
will fold all my org outlines until the third level
That works fine. However, I want to do exactly the same thing in the outline-minor-mode
instead of the org-mode
. My outlines are defined as:
(defvar my-outline-regexp-alist
'((emacs-lisp-mode . "\\s-*;;\\*+")
(js2-mode . "\\s-*//\\*+")
(web-mode . "\\s-*//\\*+")
(java-mode . "\\s-*//\\*+")
(c-mode . "\\s-*//\\*+")
(python-mode . "\\s-*##\\*+")
(sh-mode . "\\s-*##\\*+")))
The complete configuration can be found on this other emacs exchange answer. I haven't found any built-in outline function that substitutes the function org-content
. The function outline-hide-sublevels
is apparently the equivalent to the org-content
, but if I execute (outline-hide-sublevels 1)
for example it doesn't work as the (org-content 1)
does in org-mode
.
Is there any built-in function I can use in outline-minor-mode
that will work as the org-content
function? If not, is there any workaround for that?