diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-21 13:56:50 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-21 13:56:50 +0200 |
commit | daa8e23175b5ac7d1ef2d6b67b04d6f4447fb490 (patch) | |
tree | e86215ae3d57d822259c1c0fdca83c62f69a821b | |
parent | 1272458926535f140a37461e6155120f5cf45e24 (diff) | |
download | org-mode-daa8e23175b5ac7d1ef2d6b67b04d6f4447fb490.tar.gz |
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! <hymie@lactose.homelinux.net>
<http://permalink.gmane.org/gmane.emacs.orgmode/100291>
-rwxr-xr-x | lisp/org.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el index d4f2e3d..4c2477b 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) |