summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-05-07 13:11:47 (GMT)
committer Bastien Guerry <bzg@altern.org>2013-05-07 13:11:47 (GMT)
commit0df6bcdf2a28820799fec60e652c42fb144bea68 (patch)
treeda5aeb2496b331582257cff6fd7408b56fc82c85
parenta8d6ef367632472f42174d3093ddf5d5c866e5d0 (diff)
downloadorg-mode-0df6bcdf2a28820799fec60e652c42fb144bea68.zip
org-mode-0df6bcdf2a28820799fec60e652c42fb144bea68.tar.gz
org.el (org-get-outline-path): Remove statistical and checkboxes cookies
* org.el (org-get-outline-path): Remove statistical and checkboxes cookies. Thanks to Marcel van der Boom for reporting this.
-rw-r--r--lisp/org.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el
index bdf39e4..7420d10 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11325,7 +11325,12 @@ avoiding backtracing. Refile target collection makes use of that."
(widen)
(while (org-up-heading-safe)
(when (looking-at org-complex-heading-regexp)
- (push (org-match-string-no-properties 4) rtn)))
+ (push (org-trim
+ (replace-regexp-in-string
+ ;; Remove statistical/checkboxes cookies
+ "\\[[0-9]+%\\]\\|\\[[0-9]+/[0-9]+\\]" ""
+ (org-match-string-no-properties 4)))
+ rtn)))
rtn)))))
(defun org-format-outline-path (path &optional width prefix separator)