Hello,

Yasushi SHOJI <ya...@atmark-techno.com> writes:

> * lisp/org-clock.el (org-clocktable-write-default): Align formula
>   column in clock tables.
>
>   Here is an ECM:
>
>   * foo
>   ** sub
>      :LOGBOOK:
>      CLOCK: [2017-03-18 Sat 15:00]--[2017-03-18 Sat 15:15] =>  0:15
>      :END:
>   ** sub2
>      :LOGBOOK:
>      CLOCK: [2017-03-18 Sat 15:15]--[2017-03-18 Sat 15:30] =>  0:15
>      :END:
>   ** sub3
>   *** subsub1
>       :LOGBOOK:
>       CLOCK: [2017-03-18 Sat 13:00]--[2017-03-18 Sat 13:15] =>  0:15
>       :END:
>   *** subsub1
>       :LOGBOOK:
>       CLOCK: [2017-03-18 Sat 14:00]--[2017-03-18 Sat 14:15] =>  0:15
>       :END:
>   * bar
>     :LOGBOOK:
>     CLOCK: [2017-03-18 Sat 13:15]--[2017-03-18 Sat 13:30] =>  0:15
>     :END:
>   * table
>
>   #+BEGIN: clocktable :maxlevel 3 :scope file :formula %
>   #+CAPTION: Clock summary at [2017-03-18 Sat 16:50]
>
>   | Headline      |   Time |      |      |     % |
>   |---------------+--------+------+------+-------|
>   | *Total time*  | *1:15* |      |      | 100.0 |
>   |---------------+--------+------+------+-------|
>   | foo           |   1:00 |      |      |  80.0 |
>   | \_  sub       |        | 0:15 |      |  20.0 |
>   | \_  sub2      |        | 0:15 |      |  20.0 |
>   | \_  sub3      |        | 0:30 |      |  40.0 |
>   | \_    subsub1 |        |      | 0:15 |  20.0 |
>   | \_    subsub1 |        |      | 0:15 |  20.0 |
>   | bar           |   0:15 |      |      |  20.0 |
>   #+END:
> ---
>  lisp/org-clock.el | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index ffa1b3003..73afd87e6 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -2622,6 +2622,7 @@ from the dynamic block definition."
>                ;; Empty fields for higher levels.
>                (make-string (max 0 (1- (min time-columns level))) ?|)
>                hlc (org-minutes-to-clocksum-string time) hlc "|" ; time
> +              (make-string (max 0 (- time-columns level)) ?|)
>                (if (eq formula '%)
>                    (format "%.1f |" (* 100 (/ time (float total-time))))
>                  "")

Applied, with a proper commit message. Thank you.

Regards,

-- 
Nicolas Goaziou

Reply via email to