0

patient StackExchange,

I am learning org-mode and liking its header-folding capacities, which seem much easier than outline-minor-mode. Most of my work is done in markdown mode, though, so I am trying (and failing) to set up outshine (from MELPA) in order to get org-like folding and restructuring.

Here is the weird (to me) behavior: with no change to my .emacs (other than MELPA's adding to package-selected-packages), it seems that when I load a markdown file, I can get the tab-folding behavior. This is weird since C-h m does not show outshine mode (but it does show outline-minor-mode, which my .emacs loads with hooks to text-mode etc). But I don't get any restructuring commands - when I hit alt-down, for example, I get <M-down> is undefined.

But if I manually load outshine in the markdown buffer, or load it with hooks in .emacs, then none of the folding works - and it seems that's because outline-regexp has suddenly changed to an asterisk-based one rather than a #-based one.

So my main questions:

  • How do I get outshine to leave markdown's outline-regexp alone?
  • Should I replace outline-minor-mode hooks in my .emacs with hooks to outshine, or add outshine hooks in addition to the outline-minor-mode ones?
  • Outshine is supposed to also be able to do restructuring with like and such, right?

Thanks in advance, as always, for your time & attention.

2
  • to start with, it's a outline-minor-mode replacement, so if you call for it, change to outshine-mode. Sounds like modes clashing.
    – Muihlinn
    May 22, 2020 at 16:46
  • Thanks! Weirdly, I get the sorta-folding behavior whether or not outline-minor-mode is called. I remove the outshine and outline hooks from my .emacs, and 'C-h m' will confirm neither outline nor outshine are loaded in the markdown buffer, but tabs will still fold headers locally and buffer-wide - but <M-up> etc don't work. When I try loading outshine by itself, I get the regexp change. -EDIT: I did just notice when I load outshine in a buffer without either outline or outshine, 'C-h m' suddenly shows both outline AND outshine. Is that normal behavior? May 23, 2020 at 0:05

1 Answer 1

1

Digging further, I feel stupid(er than usual). Removing outshine-mode completely, I still get org-like folding behavior in markdown-mode, and this is because org-like folding is already in markdown mode! (See under "Usage".)

As for the restructuring commands (moving one header above another and so on), these are just done by C-<down> etc. instead of M-<down>.

1
  • you know, nothing is as good/bad as it seems beforehand :)
    – Muihlinn
    May 25, 2020 at 18:40

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.