From 2361624ba5b6fb9a49ebfa55f0cfc7245488437e Mon Sep 17 00:00:00 2001 From: Matt Lundin Date: Sat, 13 Aug 2011 09:10:58 -0500 Subject: [PATCH] Allow org-cycle to work in outline buffers. * lisp/org.el: (org-overview): Bind value of org-outline-regexp-bol locally, so as to use the value of org-outline-regexp, which is in turn locally bound to outline-regexp. --- lisp/org.el | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index e407e81..ee5397c 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6234,12 +6234,13 @@ of the first headline in the buffer. This is important, because if the first headline is not level one, then (hide-sublevels 1) gives confusing results." (interactive) - (let ((level (save-excursion - (goto-char (point-min)) - (if (re-search-forward org-outline-regexp-bol nil t) - (progn - (goto-char (match-beginning 0)) - (funcall outline-level)))))) + (let* ((org-outline-regexp-bol (concat "^" org-outline-regexp)) + (level (save-excursion + (goto-char (point-min)) + (if (re-search-forward org-outline-regexp-bol nil t) + (progn + (goto-char (match-beginning 0)) + (funcall outline-level)))))) (and level (hide-sublevels level)))) (defun org-content (&optional arg) -- 1.7.6