* how to extract start time and end time from the CLOCK: property
@ 2008-08-17 23:58 Seweryn Kokot
2008-09-03 9:37 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Seweryn Kokot @ 2008-08-17 23:58 UTC (permalink / raw)
To: emacs-orgmode
I would like to have a list of actions with starting and ending times
and with duration.
Now I have the column view as follows
#+BEGIN: columnview :hlines 1 :id global
| Action | start - end, duration | duration |
|----------------+---------------------------------------------------------+----------|
| * 17-08-2008 | | 3:38 |
| ** DONE task1 | [2008-08-17 nie 09:03]--[2008-08-17 nie 10:04] => 1:01 | 1:01 |
| ** DONE task2 | [2008-08-17 nie 10:05]--[2008-08-17 nie 10:35] => 0:30 | 0:30 |
#+END:
#+COLUMNS: %25ITEM(Action) %55CLOCK(start - end, duration) %8CLOCKSUM(duration)
but I would like something like this
#+BEGIN: columnview :hlines 1 :id global
| Action | start | end | duration |
|----------------+--------+--------+----------|
| * 17-08-2008 | | | 3:38 |
| ** DONE task1 | 09:03 | 10:04 | 1:01 |
| ** DONE task2 | 10:05 | 10:35 | 0:30 |
#+END:
#+COLUMNS: %25ITEM(Action) %8CLOCK[start] %8CLOCK[end] %8CLOCKSUM(duration)
In other words it would be nice to extract starting time and ending time
from the time range in the CLOCK property so that it would be possible
to insert them in two separate columns in a column view and in a dynamic
block.
Any ideas?
regards,
Seweryn Kokot
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to extract start time and end time from the CLOCK: property
2008-08-17 23:58 how to extract start time and end time from the CLOCK: property Seweryn Kokot
@ 2008-09-03 9:37 ` Carsten Dominik
2008-09-03 19:10 ` Seweryn Kokot
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-09-03 9:37 UTC (permalink / raw)
To: Seweryn Kokot; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1830 bytes --]
Hi Seweryn,
please see
http://thread.gmane.org/gmane.emacs.orgmode/7430/focus=7430
- Carsten
On Aug 18, 2008, at 1:58 AM, Seweryn Kokot wrote:
> I would like to have a list of actions with starting and ending times
> and with duration.
>
> Now I have the column view as follows
>
> #+BEGIN: columnview :hlines 1 :id global
> | Action | start - end,
> duration | duration |
> |----------------
> +---------------------------------------------------------+----------|
> | * 17-08-2008
> | | 3:38 |
> | ** DONE task1 | [2008-08-17 nie 09:03]--[2008-08-17 nie 10:04]
> => 1:01 | 1:01 |
> | ** DONE task2 | [2008-08-17 nie 10:05]--[2008-08-17 nie 10:35]
> => 0:30 | 0:30 |
> #+END:
> #+COLUMNS: %25ITEM(Action) %55CLOCK(start - end, duration)
> %8CLOCKSUM(duration)
>
> but I would like something like this
>
> #+BEGIN: columnview :hlines 1 :id global
> | Action | start | end | duration |
> |----------------+--------+--------+----------|
> | * 17-08-2008 | | | 3:38 |
> | ** DONE task1 | 09:03 | 10:04 | 1:01 |
> | ** DONE task2 | 10:05 | 10:35 | 0:30 |
> #+END:
> #+COLUMNS: %25ITEM(Action) %8CLOCK[start] %8CLOCK[end]
> %8CLOCKSUM(duration)
>
> In other words it would be nice to extract starting time and ending
> time
> from the time range in the CLOCK property so that it would be possible
> to insert them in two separate columns in a column view and in a
> dynamic
> block.
>
> Any ideas?
>
> regards,
> Seweryn Kokot
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[-- Attachment #1.2: Type: text/html, Size: 3123 bytes --]
[-- Attachment #2: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to extract start time and end time from the CLOCK: property
2008-09-03 9:37 ` Carsten Dominik
@ 2008-09-03 19:10 ` Seweryn Kokot
2008-09-04 6:56 ` Carsten Dominik
0 siblings, 1 reply; 5+ messages in thread
From: Seweryn Kokot @ 2008-09-03 19:10 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
> Hi Seweryn,
>
> please see
>
> http://thread.gmane.org/gmane.emacs.orgmode/7430/focus=7430
Hi Carsten
Thanks a lot! This is exactly what I wanted. In my case the following
works
(defun my-org-column-cleaner (title value)
(cond
((equal title "Start")
(if (and value (>= (length value) 40))
(substring value 16 21)
nil ; there was no value, or it was a short string
))
((equal title "End")
(if (and value (>= (length value) 40))
(substring value 40 45)
nil ; there was no value, or it was a short string
))
(t nil)))
(setq org-columns-modify-value-for-display-function 'my-org-column-cleaner)
and
#+COLUMNS: %50ITEM(Action) %8CLOCK(Start) %8CLOCK(End) %7CLOCKSUM(Clocked)
The only problem is that Emacs+orgmode under Linux gives
[2008-08-19 wto 07:26]--[2008-08-19 wto 08:26]
and under Windows I got
[2008-08-05 Wt 11:44]--[2008-08-05 Wt 13:47]
I guess this is caused by the system locales. Is it possible to make it
consistent with some settings in .emacs file?
regards,
--
Seweryn
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: how to extract start time and end time from the CLOCK: property
2008-09-03 19:10 ` Seweryn Kokot
@ 2008-09-04 6:56 ` Carsten Dominik
2008-09-04 22:03 ` Seweryn Kokot
0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2008-09-04 6:56 UTC (permalink / raw)
To: Seweryn Kokot; +Cc: emacs-orgmode
On Sep 3, 2008, at 9:10 PM, Seweryn Kokot wrote:
> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> Hi Seweryn,
>>
>> please see
>>
>> http://thread.gmane.org/gmane.emacs.orgmode/7430/focus=7430
>
> Hi Carsten
>
> Thanks a lot! This is exactly what I wanted. In my case the following
> works
>
> (defun my-org-column-cleaner (title value)
> (cond
> ((equal title "Start")
> (if (and value (>= (length value) 40))
> (substring value 16 21)
> nil ; there was no value, or it was a short string
> ))
> ((equal title "End")
> (if (and value (>= (length value) 40))
> (substring value 40 45)
> nil ; there was no value, or it was a short string
> ))
> (t nil)))
> (setq org-columns-modify-value-for-display-function 'my-org-column-
> cleaner)
>
> and
>
> #+COLUMNS: %50ITEM(Action) %8CLOCK(Start) %8CLOCK(End)
> %7CLOCKSUM(Clocked)
>
>
> The only problem is that Emacs+orgmode under Linux gives
>
> [2008-08-19 wto 07:26]--[2008-08-19 wto 08:26]
>
> and under Windows I got
>
> [2008-08-05 Wt 11:44]--[2008-08-05 Wt 13:47]
>
> I guess this is caused by the system locales. Is it possible to make
> it
> consistent with some settings in .emacs file?
I don't know how to do this, byt you could use a regular expression to
extract the time instead of a fixed substring, like
(if (and value (>= (length value) 40)
(string-match "[0-9]+:[0-9]+" value))
(mach-string 0 value)
nil ; there was no value, or it was a short string
HTH
- Carsten
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to extract start time and end time from the CLOCK: property
2008-09-04 6:56 ` Carsten Dominik
@ 2008-09-04 22:03 ` Seweryn Kokot
0 siblings, 0 replies; 5+ messages in thread
From: Seweryn Kokot @ 2008-09-04 22:03 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik <dominik@science.uva.nl> writes:
>
> I don't know how to do this, byt you could use a regular expression to
> extract the time instead of a fixed substring, like
>
> (if (and value (>= (length value) 40)
> (string-match "[0-9]+:[0-9]+" value))
> (mach-string 0 value)
> nil ; there was no value, or it was a short string
>
>
> HTH
>
> - Carsten
Thanks, as always it helped!
regards,
Seweryn
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-09-04 21:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-17 23:58 how to extract start time and end time from the CLOCK: property Seweryn Kokot
2008-09-03 9:37 ` Carsten Dominik
2008-09-03 19:10 ` Seweryn Kokot
2008-09-04 6:56 ` Carsten Dominik
2008-09-04 22:03 ` Seweryn Kokot
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).