From: Carsten Dominik <dominik@science.uva.nl>
To: Seweryn Kokot <s.kokot@po.opole.pl>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: how to extract start time and end time from the CLOCK: property
Date: Thu, 4 Sep 2008 08:56:56 +0200 [thread overview]
Message-ID: <8A291741-D990-4420-A817-D513ECBEBC7D@uva.nl> (raw)
In-Reply-To: <87bpz5jb9f.fsf@poczta.po.opole.pl>
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
next prev parent reply other threads:[~2008-09-04 6:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-09-04 22:03 ` Seweryn Kokot
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=8A291741-D990-4420-A817-D513ECBEBC7D@uva.nl \
--to=dominik@science.uva.nl \
--cc=emacs-orgmode@gnu.org \
--cc=s.kokot@po.opole.pl \
/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).