0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:36:26 +00:00

Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2016-08-20 00:27:33 +02:00
commit c0924db32c
2 changed files with 24 additions and 10 deletions

View file

@ -1854,15 +1854,13 @@ PROPNAME lets you set a custom text property instead of :org-clock-minutes."
(goto-char (match-beginning 0))
(put-text-property (point) (point-at-eol)
(or propname :org-clock-minutes) time)
(if headline-filter
(save-excursion
(save-match-data
(while
(> (funcall outline-level) 1)
(outline-up-heading 1 t)
(put-text-property
(point) (point-at-eol)
:org-clock-force-headline-inclusion t))))))
(when headline-filter
(save-excursion
(save-match-data
(while (org-up-heading-safe)
(put-text-property
(point) (line-end-position)
:org-clock-force-headline-inclusion t))))))
(setq t1 0)
(cl-loop for l from level to (1- lmax) do
(aset ltimes l 0)))))))

View file

@ -318,7 +318,23 @@ contents. The clocktable doesn't appear in the buffer."
(insert (org-test-clock-create-clock "-10y 15:00" "-10y 18:00"))
(insert (org-test-clock-create-clock "-2d 15:00" "-2d 18:00"))
(test-org-clock-clocktable-contents-at-point
":block untilnow :indent nil")))))
":block untilnow :indent nil"))))
;; Test tag filtering.
(should
(equal
"| Headline | Time | |
|--------------+--------+------|
| *Total time* | *2:00* | |
|--------------+--------+------|
| H1 | | 2:00 |
"
(org-test-with-temp-text "** H1\n\n*** H2 :tag:\n\n*** H3\n<point>"
(insert (org-test-clock-create-clock ". 1:00" ". 2:00"))
(goto-line 4)
(insert (org-test-clock-create-clock ". 2:00" ". 4:00"))
(goto-line 2)
(test-org-clock-clocktable-contents-at-point
":tags \"tag\" :indent nil")))))
(provide 'test-org-clock)
;;; test-org-clock.el end here