0

I have this in an org-mode buffer

* Synonyms

culture
discipline
improvement
information
learning
literacy
scholarship

and would like to simply highlight this list starting with culture and ending with scholarship and turn them all into sub-headings directly under Synonyms. Is this possible, already a feature? I realize I can put the cursor in front of each entry and hit M-Enter, but is a bulk way possible?

2

C-c * on region to run org-ctrl-c-star

1

As @nichijou points out, C-c * on the region will turn a sequence of plain lines into a sequence of headings (and vice-versa: in this context, org-ctrl-c-star runs the function org-toggle-heading which turns text to headings or headings to text - you should do C-h f on each of these functions to find out more about it, e.g. what happens with list items).

Similarly, C-c - on a region turns a sequence of lines into a sequence of list items (and vice-versa: as you might have guessed C-c - is bound to the function org-ctrl-c-minus which in this context runs org-toggle-item).

The main point of this however, is that instead of asking on Emacs SE, you can really make your life easier by asking Emacs itself. E.g. in this case, you might start by doing an apropos search for commands that match org and heading: C-c a org heading - that will get you a list of a dozen or so matching commands with one-line descriptions, the last of which is the aforementioned org-toggle-heading whose description reads: Convert headings to normal text, or items or text to headings. Bingo!

You can then ask for help on the function with C-h f org-toggle-heading and you can look for it in the manual with C-h i g (org) org-toggle-heading which will point you to the C-c *` keybinding.

You might think that this is 20-20 hindsight, but if you keep at it for a little bit, you will find that the Emacs documentation system is the bee's knees, and if you learn to use it effectively (which is not that hard to do), you will be able to answer the vast majority of your questions much faster than you can type the question on Emacs SE (and maybe in a little while, faster than you can type "Emacs SE", let alone typing the question :-) )

1
  • 1
    Thanks for your tips. Will try apropos more often. – 147pm May 23 at 15:44

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.