2

I'm trying to define a structure for outline-minor-mode so I can organize my init.el conf without relying in org.

So far I could not get to work with two levels of heading, I would like to have ;;; and ;;;; as possible levels, so I could organize a little further.

My code so far:

;;; Outline-mode
;; Local Variables:
;; outline-regexp: ";\\{3,4\\} "
;; outline-heading-alist: ((";;; " . 1) (";;;; " . 2))
;; eval: (outline-minor-mode 1)
;; eval: (while (re-search-forward outline-regexp nil t) (outline-hide-subtree))
;; End:

I'm not very good at regex yet, so I'm not sure how to make it to work.

The problem is that without two levels of heading when I "hide all" the levels they got without any space or further organization like in the left image. I can try to break some lines like in the right image, but when I show/hide again the folding ignore the lines again.

I'm trying to avoid outshine and org, but I might migrate if I can't manage to accomplish the following:

Space problems

1 Answer 1

3

Not 100% sure if I understand your question, but you may want to try setting (setq outline-blank-line t).

Non-nil means to leave unhidden blank line before heading.

1
  • And that's it. :) I can't upvote you because of the weird reputation policies of stack. Thank you very much! Sep 6, 2020 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.