Browse Source

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.
Bastien Guerry 4 years ago
parent
commit
0df6bcdf2a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lisp/org.el

+ 6 - 1
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)