Jonas Bernoulli writes:
`orgstruct-mode' sounds like it could be really useful too, but
as I mentioned it doesn't work for me at all. So for now I
would like to stick to just `outline-minor-mode'.
Thanks
Jonas
Ps: I am still not sure whether I am just doing something stupid
or why else `orgstruct-mode' doesn't work for me. So I would
apprechiate a little tutorial starting from emacs -Q that
demonstrates what setup is required and what keys I have to
press for things to happen.
Generally it is enough to set orgstruct-heading-prefix-regexp and
turn-on-orgstruct. I do this on a per mode basis, for example:
#+BEGIN_SRC emacs-lisp
(add-hook 'elisp-mode-hook 'turn-on-orgtbl)
(add-hook 'elisp-mode-hook
(lambda ()
(setq-local orgstruct-heading-prefix-regexp
";; ")))
#+END_SRC
Then you can organize your code using
;; * section-name
;; ** subsection-name
and folding with TAB, shift-TAB, etc will work when you are in
those lines.
To use lists you just have to start a line with -, +, 1., etc and
then lists keybindings work, for example M-C-m for new items. I do
not know why lists do not respect orgstruct-heading-prefix-regexp,
it has always seem weird to me that I cannot gain orgstruct
functionality with something like:
;; - first item
;; - second item
--
Jorge.