emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* decimal hours for clocking
@ 2009-05-06  2:41 Samuel Wales
  2009-05-06  5:11 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2009-05-06  2:41 UTC (permalink / raw)
  To: emacs-orgmode

This is a tiny little thing, but currently org-clock-display shows
hours and minutes.  Perhaps it could also show decimal hours.  Thus
9:30 could report as "9:30 (9.5h)".  I'd find it easier not to have to
calculate it manually.

Thanks.

-- 
Myalgic encephalomyelitis denialism is causing death (decades early;
Jason et al. 2006) and severe suffering (worse than nearly all other
diseases studied; e.g. Schweitzer et al. 1995) and grossly corrupting
science.  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: decimal hours for clocking
  2009-05-06  2:41 decimal hours for clocking Samuel Wales
@ 2009-05-06  5:11 ` Nick Dokos
  2009-05-27 22:43   ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2009-05-06  5:11 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Samuel Wales <samologist@gmail.com> wrote:

> This is a tiny little thing, but currently org-clock-display shows
> hours and minutes.  Perhaps it could also show decimal hours.  Thus
> 9:30 could report as "9:30 (9.5h)".  I'd find it easier not to have to
> calculate it manually.
> 

Assuming that you talking about the total time that is written out in
the echo area by org-clock-display, you can change its last line from
this:

    ...
    (message (concat "Total file time: " org-time-clocksum-format "(%d hours and %d minutes)") h m h m)))

to this:

    ...
    (message (concat "Total file time: " org-time-clocksum-format "(%d hours and %d minutes (%d.%02d))") h m h m h (* 100 (/ m 60.0)))))

HTH,
Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: decimal hours for clocking
  2009-05-06  5:11 ` Nick Dokos
@ 2009-05-27 22:43   ` Samuel Wales
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2009-05-27 22:43 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

Thanks.  I thought it might be a generally useful thing, not just for
me.  Then again, I should perhaps again try to figure out the
clocktable stuff or properties to actually calculate hours*rate.

On Tue, May 5, 2009 at 22:11, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Samuel Wales <samologist@gmail.com> wrote:
>
>> This is a tiny little thing, but currently org-clock-display shows
>> hours and minutes.  Perhaps it could also show decimal hours.  Thus
>> 9:30 could report as "9:30 (9.5h)".  I'd find it easier not to have to
>> calculate it manually.
>>
>
> Assuming that you talking about the total time that is written out in
> the echo area by org-clock-display, you can change its last line from
> this:
>
>    ...
>    (message (concat "Total file time: " org-time-clocksum-format "(%d hours and %d minutes)") h m h m)))
>
> to this:
>
>    ...
>    (message (concat "Total file time: " org-time-clocksum-format "(%d hours and %d minutes (%d.%02d))") h m h m h (* 100 (/ m 60.0)))))
>
> HTH,
> Nick
>



-- 
Myalgic encephalomyelitis denialism is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying science.  Anybody can
get the disease at any time permanently.  Do science and justice matter to
you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 6+ messages in thread

* decimal hours for clocking
@ 2018-07-20 21:16 Samuel Wales
  2018-08-21 18:15 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2018-07-20 21:16 UTC (permalink / raw)
  To: emacs-orgmode

i used to be able to do (setq org-duration-format '(("h" . nil)
(special . 2)) to get decimal hours for clocking, like 43.22h meaning
43 hours and 22/60 minutes.

in recent org maint, this seems to show up like 2d 11:22.

perhaps user error?  what i really want is decimal hours for
org-clock-display, /but/ hh:mm for modeline clock display.  but i'm ok
with evaluating the above form when i need to do org-clock-display if
it is not possible to specify context.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: decimal hours for clocking
  2018-07-20 21:16 Samuel Wales
@ 2018-08-21 18:15 ` Nicolas Goaziou
  2018-08-21 21:55   ` Samuel Wales
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2018-08-21 18:15 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hello,

Samuel Wales <samologist@gmail.com> writes:

> i used to be able to do (setq org-duration-format '(("h" . nil)
> (special . 2)) to get decimal hours for clocking, like 43.22h meaning
> 43 hours and 22/60 minutes.
>
> in recent org maint, this seems to show up like 2d 11:22.

Org maint is more or less outdated. It was mainly used for merge with
Emacs. Now we are waiting for Org 9.2 to be released so that master can
become the new maint branch.

Could you try again with master branch? If it doesn't work, please send
an ECM.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: decimal hours for clocking
  2018-08-21 18:15 ` Nicolas Goaziou
@ 2018-08-21 21:55   ` Samuel Wales
  0 siblings, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2018-08-21 21:55 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

seems to work in maint now.  :]

On 8/21/18, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
> Org maint is more or less outdated. It was mainly used for merge with
> Emacs. Now we are waiting for Org 9.2 to be released so that master can
> become the new maint branch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-08-21 21:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06  2:41 decimal hours for clocking Samuel Wales
2009-05-06  5:11 ` Nick Dokos
2009-05-27 22:43   ` Samuel Wales
  -- strict thread matches above, loose matches on Subject: below --
2018-07-20 21:16 Samuel Wales
2018-08-21 18:15 ` Nicolas Goaziou
2018-08-21 21:55   ` Samuel Wales

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).