From 975329f904cf57170bd639cf7369dcd8237a06d0 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Tue, 12 Mar 2013 12:20:13 +0100 Subject: [PATCH] doc/org.texi (Orgstruct mode): Document `orgstruct-heading-prefix-regexp' * doc/org.texi (Orgstruct mode): Document `orgstruct-heading-prefix-regexp'. --- doc/org.texi | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/org.texi b/doc/org.texi index 2a4ebed6e..2abfbf304 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -1973,10 +1973,20 @@ When this mode is active and the cursor is on a line that looks to Org like a headline or the first line of a list item, most structure editing commands will work, even if the same keys normally have different functionality in the major mode you are using. If the cursor is not in one of those special -lines, Orgstruct mode lurks silently in the shadows. When you use -@code{orgstruct++-mode}, Org will also export indentation and autofill -settings into that mode, and detect item context after the first line of an -item. +lines, Orgstruct mode lurks silently in the shadows. + +When you use @code{orgstruct++-mode}, Org will also export indentation and +autofill settings into that mode, and detect item context after the first +line of an item. + +@vindex orgstruct-heading-prefix-regexp +You can also use Org structure editing to fold and unfold headlines in +@emph{any} file, provided you defined @var{orgstruct-heading-prefix-regexp}: +the regular expression must match the local prefix to use before Org's +headlines. For example, if you set this variable to @code{"^;; "} in Emacs +Lisp files, you will be able to fold and unfold headlines in Emacs Lisp +commented lines. Some commands like @code{org-demote} are disabled when the +prefix is set, but folding/unfolding will work correctly. @node Tables, Hyperlinks, Document Structure, Top @chapter Tables