diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-11 14:11:15 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2015-08-11 14:11:15 +0200 |
commit | 9bb87f49f72de1ff7fcddc063f961d898b9f3c81 (patch) | |
tree | e2437117f8a4964c6f4336115d0f1762e5c9a5c6 | |
parent | ac0661189ee10b15c7296072f50de3af0b21ebdc (diff) | |
download | org-mode-9bb87f49f72de1ff7fcddc063f961d898b9f3c81.tar.gz |
org-list: Fix "Invalid search bound" error
* lisp/org-list.el (org-update-checkbox-count): Fix "Invalid search
bound" error.
Reported-by: Rasmus <rasmus@gmx.us>
<http://permalink.gmane.org/gmane.emacs.orgmode/99837>
-rw-r--r-- | lisp/org-list.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el index 05f1922..e6a78f7 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -2550,10 +2550,13 @@ With optional prefix argument ALL, do this for the whole buffer." (when (eq (org-element-type element) 'item) (push (org-element-property :structure element) structs) - (goto-char (org-element-property - :end - (org-element-property :parent - element)))))) + ;; Skip whole list since we have its + ;; structure anyway. + (while (setq element (org-element-lineage + element '(plain-list))) + (goto-char + (min (org-element-property :end element) + end)))))) ;; Cache count for cookies applying to the same ;; area. Then return it. (let ((count |