emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* fractional hours for timestamps?
@ 2010-08-12 12:39 Greg Troxel
  2010-08-12 16:34 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Troxel @ 2010-08-12 12:39 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 455 bytes --]


I tried to set a timestamp "thu 12:00+1.5", using C-c . and typing the
characters in quotes.  What I got was
<2010-08-12 Thu 12:00-13:00>

I found that 12:00+1:30 works fine, but it seems like 1.5 should be
parsed.

Separately, I'd like 24-hour time without colons to work.  "thu 1400"
seems unambiguous, but just shows up as thursday without a time.

I don't know how hard these are or if there are reasons not to, but I
thought I'd throw out the idea.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 194 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] 7+ messages in thread

* Re: fractional hours for timestamps?
  2010-08-12 12:39 fractional hours for timestamps? Greg Troxel
@ 2010-08-12 16:34 ` Bastien
  2010-08-12 18:22   ` Łukasz Stelmach
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2010-08-12 16:34 UTC (permalink / raw)
  To: Greg Troxel; +Cc: emacs-orgmode

Hi Greg,

Greg Troxel <gdt@ir.bbn.com> writes:

> I tried to set a timestamp "thu 12:00+1.5", using C-c . and typing the
> characters in quotes.  What I got was
> <2010-08-12 Thu 12:00-13:00>
>
> I found that 12:00+1:30 works fine, but it seems like 1.5 should be
> parsed.
>
> Separately, I'd like 24-hour time without colons to work.  "thu 1400"
> seems unambiguous, but just shows up as thursday without a time.
>
> I don't know how hard these are or if there are reasons not to, but I
> thought I'd throw out the idea.

It is certainly harder to make Org's parsing capacity even more elastic
than to let our brains parse this directly :)

12:00+1.5 looks weird to me and computing 1.5->1:30 is straightforward.
Same for 1400->14:00.  

But maybe other people think otherwise...  

-- 
 Bastien

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

* Re: fractional hours for timestamps?
  2010-08-12 16:34 ` Bastien
@ 2010-08-12 18:22   ` Łukasz Stelmach
  2010-08-13  8:28     ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Łukasz Stelmach @ 2010-08-12 18:22 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bastien.guerry@wikimedia.fr> writes:

> Greg Troxel <gdt@ir.bbn.com> writes:
>
>> I tried to set a timestamp "thu 12:00+1.5", using C-c . and typing the
>> characters in quotes.  What I got was
>> <2010-08-12 Thu 12:00-13:00>
>>
>> I found that 12:00+1:30 works fine, but it seems like 1.5 should be
>> parsed.
>>
>> Separately, I'd like 24-hour time without colons to work.  "thu 1400"
>> seems unambiguous, but just shows up as thursday without a time.
>>
>> I don't know how hard these are or if there are reasons not to, but I
>> thought I'd throw out the idea.
>
> It is certainly harder to make Org's parsing capacity even more elastic
> than to let our brains parse this directly :)
>
> 12:00+1.5 looks weird to me and computing 1.5->1:30 is straightforward.
> Same for 1400->14:00.  
>
> But maybe other people think otherwise...  

I think Greg's point is about entering data using only numeric keypad. I
can confirm that I have considered these issues (esp. 1400
vs. 14:00). Fractional hours don't seem to be that easy as there are
countries like Poland where you use comma as decimal point (working with
Emacs' built in calc is a pain) which earns another few lines for
parsing code.

-- 
Miłego dnia,
Łukasz Stelmach

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

* Re: Re: fractional hours for timestamps?
  2010-08-12 18:22   ` Łukasz Stelmach
@ 2010-08-13  8:28     ` Bastien
  2010-08-13  9:43       ` Łukasz Stelmach
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2010-08-13  8:28 UTC (permalink / raw)
  To: Łukasz Stelmach; +Cc: emacs-orgmode

Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:

> I think Greg's point is about entering data using only numeric keypad. I
> can confirm that I have considered these issues (esp. 1400
> vs. 14:00). Fractional hours don't seem to be that easy as there are
> countries like Poland where you use comma as decimal point (working with
> Emacs' built in calc is a pain) which earns another few lines for
> parsing code.

AFAIC, I won't mess with this part of the code, I think it's quite easy
enough to enter 14:00 instead of 1400...  patch welcome ;)

-- 
 Bastien

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

* Re: fractional hours for timestamps?
  2010-08-13  8:28     ` Bastien
@ 2010-08-13  9:43       ` Łukasz Stelmach
  2010-08-16 10:38         ` Carsten Dominik
  0 siblings, 1 reply; 7+ messages in thread
From: Łukasz Stelmach @ 2010-08-13  9:43 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bastien.guerry@wikimedia.fr> writes:

> Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:
>
>> I think Greg's point is about entering data using only numeric keypad. I
>> can confirm that I have considered these issues (esp. 1400
>> vs. 14:00). Fractional hours don't seem to be that easy as there are
>> countries like Poland where you use comma as decimal point (working with
>> Emacs' built in calc is a pain) which earns another few lines for
>> parsing code.
>
> AFAIC, I won't mess with this part of the code, I think it's quite easy
> enough to enter 14:00 instead of 1400...

Not really in fact if you use keypad. It's not about the number of
keystrokes but their layout. Try it.

>  patch welcome ;)
ASAP ;)

-- 
Miłego dnia,
Łukasz Stelmach

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

* Re: Re: fractional hours for timestamps?
  2010-08-13  9:43       ` Łukasz Stelmach
@ 2010-08-16 10:38         ` Carsten Dominik
  2010-08-16 11:28           ` Richard Riley
  0 siblings, 1 reply; 7+ messages in thread
From: Carsten Dominik @ 2010-08-16 10:38 UTC (permalink / raw)
  To: Łukasz Stelmach; +Cc: emacs-orgmode


On Aug 13, 2010, at 11:43 AM, Łukasz Stelmach wrote:

> Bastien <bastien.guerry@wikimedia.fr> writes:
>
>> Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:
>>
>>> I think Greg's point is about entering data using only numeric  
>>> keypad. I
>>> can confirm that I have considered these issues (esp. 1400
>>> vs. 14:00). Fractional hours don't seem to be that easy as there are
>>> countries like Poland where you use comma as decimal point  
>>> (working with
>>> Emacs' built in calc is a pain) which earns another few lines for
>>> parsing code.
>>
>> AFAIC, I won't mess with this part of the code, I think it's quite  
>> easy
>> enough to enter 14:00 instead of 1400...
>
> Not really in fact if you use keypad. It's not about the number of
> keystrokes but their layout. Try it.

Hi Lukasz,

the problem with making the parser more general is that it might
start to interpret years as durations and the other way round.
You are welcome to submit a patch - but it would have to be a careful  
one.

- Carsten

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

* Re: fractional hours for timestamps?
  2010-08-16 10:38         ` Carsten Dominik
@ 2010-08-16 11:28           ` Richard Riley
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Riley @ 2010-08-16 11:28 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> On Aug 13, 2010, at 11:43 AM, Łukasz Stelmach wrote:
>
>> Bastien <bastien.guerry@wikimedia.fr> writes:
>>
>>> Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> writes:
>>>
>>>> I think Greg's point is about entering data using only numeric  
>>>> keypad. I
>>>> can confirm that I have considered these issues (esp. 1400
>>>> vs. 14:00). Fractional hours don't seem to be that easy as there are
>>>> countries like Poland where you use comma as decimal point  
>>>> (working with
>>>> Emacs' built in calc is a pain) which earns another few lines for
>>>> parsing code.
>>>
>>> AFAIC, I won't mess with this part of the code, I think it's quite  
>>> easy
>>> enough to enter 14:00 instead of 1400...
>>
>> Not really in fact if you use keypad. It's not about the number of
>> keystrokes but their layout. Try it.
>
> Hi Lukasz,
>
> the problem with making the parser more general is that it might
> start to interpret years as durations and the other way round.
> You are welcome to submit a patch - but it would have to be a careful  
> one.
>
> - Carsten

I'm curious if using the decimal point on the numeric keyboard instead
of the ":" colon would be the simplest solution in time durations too
... e.g 14:00+1,30. (add one hour 30 minutes). But knowing how clever the
parser is that might step on the shoes of other hidden cleverness I am
unaware of.

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

end of thread, other threads:[~2010-08-16 11:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12 12:39 fractional hours for timestamps? Greg Troxel
2010-08-12 16:34 ` Bastien
2010-08-12 18:22   ` Łukasz Stelmach
2010-08-13  8:28     ` Bastien
2010-08-13  9:43       ` Łukasz Stelmach
2010-08-16 10:38         ` Carsten Dominik
2010-08-16 11:28           ` Richard Riley

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