[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] org.el: fix org--get-outline-path-1
From: |
Tobias Getzner |
Subject: |
[O] [PATCH] org.el: fix org--get-outline-path-1 |
Date: |
Mon, 29 Feb 2016 15:35:28 +0100 |
Headline titles may be empty, in which case the respective match group
will be nil. This would throw an error when trying to regexp-replace
checkbox cookies.
TODO: Depending on preference, a place-holder string might be a better
choice (for user-display) rather than leaving the outline-path element empty.
---
lisp/org.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index 3e2f1c1..f45b9fc 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11611,7 +11611,7 @@ (defun org--get-outline-path-1 (&optional use-cache)
;; Remove statistical/checkboxes cookies.
(replace-regexp-in-string
"\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" ""
- (org-match-string-no-properties 4))))))
+ (or (org-match-string-no-properties 4) ""))))))
(if (org-up-heading-safe)
(let ((path (cons heading (org--get-outline-path-1 use-cache))))
(when use-cache
--
2.7.2
- [O] [PATCH] org.el: fix org--get-outline-path-1,
Tobias Getzner <=