* Bug: org-clock-sum filter infinite loop [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/me/.emacs.d/elpa/org-20150223/)]
@ 2015-03-05 20:50 Stephen
2015-08-05 0:00 ` Bastien Guerry
0 siblings, 1 reply; 2+ messages in thread
From: Stephen @ 2015-03-05 20:50 UTC (permalink / raw)
To: Emacs OrgMode
I want to sum clock times for items which are in state TODO in the agenda.
Using org-clocksum-curret-item as a template:
(defun org-clock-sum-current-item (&optional tstart)
"Return time, clocked on current item in total."
(save-excursion
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum tstart)
org-clock-file-total-minutes)))
The following works the same as above (nil start and end time):
(defun my-org-clock-sum-current-item-in-state ()
(save-excursion
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil)
org-clock-file-total-minutes)))
This version with a filter reports zero clocked time, as expected:
(defun my-org-clock-sum-current-item-in-state ()
(save-excursion
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil (lambda () nil))
org-clock-file-total-minutes)))
And this version with a filter goes into an infinite loop some where
in org-clock-sum after processing several items:
(defun my-org-clock-sum-current-item-in-state ()
(save-excursion
(save-restriction
(org-narrow-to-subtree)
(org-clock-sum nil nil (lambda () t))
org-clock-file-total-minutes)))
I would like to use a filter like:
(lambda () (string-equal "TODO" (org-get-todo-state)))
But it looks like no filters are working.
------------------------------------------------------------------------
Emacs : GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.5)
of 2014-11-19 on buildvm-03.phx2.fedoraproject.org
Package: Org-mode version 8.2.10 (8.2.10-34-gc41bbc-elpa @
/home/me/.emacs.d/elpa/org-20150223/)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-05 0:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-05 20:50 Bug: org-clock-sum filter infinite loop [8.2.10 (8.2.10-34-gc41bbc-elpa @ /home/me/.emacs.d/elpa/org-20150223/)] Stephen
2015-08-05 0:00 ` Bastien Guerry
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.