Am 08.03.2013 12:23, schrieb Bastien:
Andreas Röhler <andreas.roeh...@easy-emacs.de> writes:
IMHO remains to make that buffer-local and use outline-regexp from
inside org-mode.
Have a go and let us know :)
That should work already - to start with.
commit 8cf6bc6faeb2a3b3fec0780e56a04ef0e13c3c62
Author: Andreas Roehler <andreas.roeh...@online.de>
Date: Fri Mar 8 13:58:13 2013 +0100
Enable different heading chars, not just `*'
Use variable `org-heading-char', customizable later on,
instead of hard-coded `*'
TINYCHANGE
diff --git a/lisp/org.el b/lisp/org.el
index 811506a..2db63ae 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -90,13 +90,17 @@
;; `org-outline-regexp'. The only function still directly relying on
;; `outline-regexp' is `org-overview' so that `org-cycle' can do its
;; job when `orgstruct-mode' is active.
+(defvar org-heading-char "*")
+
(defvar org-outline-regexp "\\*+ "
"Regexp to match Org headlines.")
+(setq org-outline-regexp (concat (regexp-quote org-heading-char) "+ "))
(defvar org-outline-regexp-bol "^\\*+ "
"Regexp to match Org headlines.
This is similar to `org-outline-regexp' but additionally makes
sure that we are at the beginning of the line.")
+(setq org-outline-regexp-bol (concat "^" (regexp-quote org-heading-char) "+ "))
(defvar org-heading-regexp "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ \t]*$"
"Matches a headline, putting stars and text into groups.