diff options
author | Bastien <bzg@gnu.org> | 2020-09-07 20:15:38 +0200 |
---|---|---|
committer | Bastien <bzg@gnu.org> | 2020-09-07 20:15:38 +0200 |
commit | 19b741583d550d1c2ef959008c3fb84180326c24 (patch) | |
tree | 424e738ee4de9ac7e6e2b371cce99b3b7a1b1f0d | |
parent | 07c6b11258e4ce83b78a023e63412183cf9c4c9f (diff) | |
download | org-mode-19b741583d550d1c2ef959008c3fb84180326c24.tar.gz |
org-agenda.el (org-find-top-headline): Fix bug
* lisp/org-agenda.el (org-find-top-headline): Fix bug: don't
inclure the statistic cookie in the headline text as this can be
updated during agenda interaction.
Reported-by: William Horne <will.m.horne@gmail.com>
See <https://orgmode.org/list/CA+2+CK-TofaNS1FOyZGhd3jPKb-XNOYM-0ouP9=tW=qepKm7wg@mail.gmail.com>
-rw-r--r-- | lisp/org-agenda.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 1908800..82fe609 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7574,7 +7574,10 @@ search from." (when pos (goto-char pos)) ;; Skip up to the topmost parent. (while (org-up-heading-safe)) - (ignore-errors (nth 4 (org-heading-components)))))) + (ignore-errors + (replace-regexp-in-string + "^\\[[0-9]+/[0-9]+\\] *\\|^\\[%[0-9]+\\] *" "" + (nth 4 (org-heading-components))))))) (defvar org-agenda-filtered-by-top-headline nil) (defun org-agenda-filter-by-top-headline (strip) |