From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Yasushi SHOJI <yashi@atmark-techno.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-clock: Align formula column in clock tables
Date: Sun, 19 Mar 2017 11:00:33 +0100 [thread overview]
Message-ID: <8760j537su.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <877f3m24xu.wl@dns1.atmark-techno.com> (Yasushi SHOJI's message of "Sat, 18 Mar 2017 16:44:51 +0900")
Hello,
Yasushi SHOJI <yashi@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
prev parent reply other threads:[~2017-03-19 10:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-18 7:44 [PATCH] org-clock: Align formula column in clock tables Yasushi SHOJI
2017-03-19 10:00 ` Nicolas Goaziou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760j537su.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
--cc=yashi@atmark-techno.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).