* how do you extract schedule duration in column-view
@ 2010-08-12 16:04 Inquisitive Scientist
2010-08-12 16:19 ` Inquisitive Scientist
0 siblings, 1 reply; 3+ messages in thread
From: Inquisitive Scientist @ 2010-08-12 16:04 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 359 bytes --]
Dear Experts,
How do I make it so that column-view shows the duration of a scheduled task?
I now that if I do something like
* my top node
:PROPERTIES:
:COLUMNS: %40ITEM %%10SCHEDULED
:END:
and then create a dynamic-block I can get a table to show the scheduled
time, but what do I do if I want the duration of a scheduled task?
Thanks,
-Emin
[-- Attachment #1.2: Type: text/html, Size: 402 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please 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] 3+ messages in thread
* Re: how do you extract schedule duration in column-view
2010-08-12 16:04 how do you extract schedule duration in column-view Inquisitive Scientist
@ 2010-08-12 16:19 ` Inquisitive Scientist
2010-08-12 17:00 ` Bastien
0 siblings, 1 reply; 3+ messages in thread
From: Inquisitive Scientist @ 2010-08-12 16:19 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 852 bytes --]
Actually, I can almost figure out how to do this myself if I knew what
function to use to convert a string like
SCHEDULED: <2010-08-12 Thu 10:20-10:45>
into a duration. If I call org-time-string it only gives me the first part
of the date and ignores the ending point.
Any tips on what org-mode function to use to get the duration of a scheduled
time?
On Thu, Aug 12, 2010 at 12:04 PM, Inquisitive Scientist <
inquisitive.scientist@gmail.com> wrote:
> Dear Experts,
>
> How do I make it so that column-view shows the duration of a scheduled
> task? I now that if I do something like
>
> * my top node
> :PROPERTIES:
> :COLUMNS: %40ITEM %%10SCHEDULED
> :END:
>
> and then create a dynamic-block I can get a table to show the scheduled
> time, but what do I do if I want the duration of a scheduled task?
>
> Thanks,
> -Emin
>
[-- Attachment #1.2: Type: text/html, Size: 1169 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please 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] 3+ messages in thread
* Re: Re: how do you extract schedule duration in column-view
2010-08-12 16:19 ` Inquisitive Scientist
@ 2010-08-12 17:00 ` Bastien
0 siblings, 0 replies; 3+ messages in thread
From: Bastien @ 2010-08-12 17:00 UTC (permalink / raw)
To: Inquisitive Scientist; +Cc: emacs-orgmode
Inquisitive Scientist <inquisitive.scientist@gmail.com> writes:
> Actually, I can almost figure out how to do this myself if I knew what function
> to use to convert a string like
>
> SCHEDULED: <2010-08-12 Thu 10:20-10:45>
>
> into a duration. If I call org-time-string it only gives me the first part of
> the date and ignores the ending point.
>
> Any tips on what org-mode function to use to get the duration of a scheduled
> time?
Try this function on the scheduled timestamp:
,----
| (defun bzg-duration-of-timestamp-at-point ()
| "Compute the duration of the timestamp at point."
| (interactive)
| (save-excursion
| (forward-line 0)
| (when (re-search-forward "\\<SCHEDULED: *<\\([^>]+\\) \\([0-9]+:[0-9]+\\)--?\\([0-9]+:[0-9]+\\)>" nil t)
| (let ((date (match-string 1))
| (t1 (match-string 2))
| (t2 (match-string 3)))
| (- (org-time-string-to-seconds (concat date " " t2))
| (org-time-string-to-seconds (concat date " " t1)))))))
`----
HTH,
--
Bastien
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-12 17:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 16:04 how do you extract schedule duration in column-view Inquisitive Scientist
2010-08-12 16:19 ` Inquisitive Scientist
2010-08-12 17:00 ` Bastien
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).