3

It looks as if the promotion and demotion of headers using M-Right, M-S-Right, M-Left, M-S-Left is disabled in orgstruct-mode as per this emacs-orgmode GNU thread.

Also, making direct function calls like M-xorgstruct-hijacker-org-metaright do nothing.

Does anyone have a patch that enables that?

Also, I can't have orgstruct-heading-prefix-regexp as nil; I need to set it at least to the comment characters of the major mode in which I am using orgstruct. And I am not planning on using block commenting for each orgstruct heading.

In my case I am setting this var to //;.

I am also curious... why would anyone not use the org mode directly if they are able to use orgstruct with this variable set to nil?

Kaushal Modi
  • 25,203
  • 3
  • 74
  • 179

1 Answers1

1

A little later in that same thread, its a bit confusing but there is a commit that solves this.

 03b1edf org.el: Disable {pro,de}motion commands in orgstruct-mode if 
orgstruct-heading-prefix-regexp is non-nil

Which isn't entirely true. Setting orgstruct-heading-prefix-regexp to nil did not enable Pro/Demotion but setting it to an empty string did.

Summary:

Evalute the following in a buffer to allow promotion/demotion of headers in an orgstruct-mode buffer.

(setq orgstruct-heading-prefix-regexp "")
  • I have confirmed this on emacs-24.4 with the latest org-mode from melpa
Gambo
  • 929
  • 5
  • 14
  • I forgot to mention.. I can't have `orgstruct-heading-prefix-regexp` as `nil`; **I need to set it atleast to the comment characters of the major mode in which I am using orgstruct.** And I am not planning on using block commenting for each orgstruct heading. In my case I am setting this var to `//; `. I am curious... Not questioning you specifically, but why would anyone not use the org mode directly if they are able to use orgstruct with this variable set to `nil`? – Kaushal Modi Oct 29 '14 at 11:28
  • ahh.. I assumed you were using orgstruct-mode for text-mode or message-mode. For editing code I use org-babel-tangle. I havent used orgstruct for anything other than message-mode. – Gambo Oct 29 '14 at 17:01
  • 1
    I just started using `outshine` today. It has many more features except that currently it can't hide `:archive:` tagged subtrees. – Kaushal Modi Oct 29 '14 at 18:43