Prechádzať zdrojové kódy

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>
Bastien 4 rokov pred
rodič
commit
19b741583d
1 zmenil súbory, kde vykonal 4 pridanie a 1 odobranie
  1. 4 1
      lisp/org-agenda.el

+ 4 - 1
lisp/org-agenda.el

@@ -7574,7 +7574,10 @@ search from."
       (when pos (goto-char pos))
       (when pos (goto-char pos))
       ;; Skip up to the topmost parent.
       ;; Skip up to the topmost parent.
       (while (org-up-heading-safe))
       (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)
 (defvar org-agenda-filtered-by-top-headline nil)
 (defun org-agenda-filter-by-top-headline (strip)
 (defun org-agenda-filter-by-top-headline (strip)