From daa8e23175b5ac7d1ef2d6b67b04d6f4447fb490 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 21 Aug 2015 13:56:50 +0200 Subject: [PATCH] Fix expansion of archived trees * lisp/org.el (org-hide-archived-subtrees): Do not assume BEG is at beginning of line. This matters when function is called with point in the middle of an archived headline. Reported-by: Hymie! --- lisp/org.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/org.el b/lisp/org.el index d4f2e3dcb..4c2477bc5 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -4755,6 +4755,8 @@ Otherwise, these types are allowed: (let ((case-fold-search nil) (re (concat org-outline-regexp-bol ".*:" org-archive-tag ":"))) (goto-char beg) + ;; Include headline point is currently on. + (beginning-of-line) (while (and (< (point) end) (re-search-forward re end t)) (when (member org-archive-tag (org-get-tags)) (org-flag-subtree t) -- 2.11.4.GIT