1

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

0

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.

| improve this answer | |
  • And that's it. :) I can't upvote you because of the weird reputation policies of stack. Thank you very much! – jacksonbenete Sep 6 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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