From ba685555c404a51d0ecdd9fa41a5753f9ff4b163 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 26 Mar 2020 21:04:00 -0400 Subject: [PATCH] org-clock: Mention semimonth step in manual and add test * doc/org-manual.org (The clock table): Mention new semimonth :step value. * testing/lisp/test-org-clock.el (test-org-clock/clocktable/step): Test :step semimonth. Add a NEWS entry as well. --- doc/org-manual.org | 6 +++--- etc/ORG-NEWS | 2 ++ testing/lisp/test-org-clock.el | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 15fff6ed2..aa7466025 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -6655,9 +6655,9 @@ be selected: - =:step= :: - Set to =day=, =week=, =month= or =year= to split the table into - chunks. To use this, either =:block=, or =:tstart= and =:tend= are - required. + Set to =day=, =week=, =semimonth, =month= or =year= to split the + table into chunks. To use this, either =:block=, or =:tstart= and + =:tend= are required. - =:stepskip0= :: diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 8f23dded2..2b60f2939 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -175,6 +175,8 @@ option ~org-display-remote-inline-images~. `k' option, but the user specifies a time of day, not a number of minutes. +*** New step value =semimonth= accepted for clock tables + *** Allow text rescaling in column view You can now use =C-x C-+= in column view: the columns face size will diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el index dbbcb819e..ccf3683a4 100644 --- a/testing/lisp/test-org-clock.el +++ b/testing/lisp/test-org-clock.el @@ -1053,6 +1053,39 @@ CLOCK: [2014-04-03 Thu 08:00]--[2014-04-03 Thu 16:00] => 8:00" (let ((system-time-locale "en_US")) (test-org-clock-clocktable-contents ":step month :mstart 4 :block 2014 :stepskip0 t"))))) + ;; Test ":step semimonth". + (should + (string-match-p + " +.*?\\[2014-03-01 .* +.* +.* +|.*?| \\*8:00\\* | +.* +| Foo +| 8:00 +| + +.*?\\[2014-03-16 .* +.* +.* +|.*?| \\*2:00\\* | +.* +| Foo +| 2:00 +| + +.*?\\[2014-04-01 .* +.* +.* +|.*?| \\*7:00\\* | +.* +| Foo +| 7:00 +| +" + (org-test-with-temp-text + "* Foo +CLOCK: [2014-03-04 Tue 08:00]--[2014-03-04 Tue 16:00] => 8:00 +CLOCK: [2014-03-24 Mon 08:00]--[2014-03-24 Mon 10:00] => 2:00 +CLOCK: [2014-04-03 Thu 08:00]--[2014-04-03 Thu 15:00] => 7:00" + (let ((system-time-locale "en_US")) + (test-org-clock-clocktable-contents + ":step semimonth :block 2014 :stepskip0 t"))))) ;; Test ":step year". (should (string-match-p