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?

1 Answer 1

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
3
  • 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? Commented Oct 29, 2014 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
    Commented Oct 29, 2014 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. Commented Oct 29, 2014 at 18:43

Your Answer

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

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