emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* suggestion for a fix to org-clock-in
@ 2009-07-28 19:48 Nicolas Goaziou
  2009-07-29  5:46 ` Bastien
  2009-08-03  4:34 ` Carsten Dominik
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2009-07-28 19:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 289 bytes --]

Hello,

For some time zone reason, my time-stamps look like this [2009-07-28
mar.]. Notice the dot after the name of the day.

This prevents the regexp inside org-clock-in to recognize it as a valid
clock format as thus to resume any started clock.

I suggest the following simple patch.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch to org-clock.el --]
[-- Type: text/x-diff, Size: 1090 bytes --]

From 0f149d1e515d017fed78fc5038127970843f9e81 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <nicolas@Misty.(none)>
Date: Tue, 28 Jul 2009 20:55:06 +0200
Subject: [PATCH] Teach org-clock-in about other date formats

Depending on your time zone, the timestamps can have somewhat differents formats (ex.: [2009-07-28 mar. 21:00]).
This kind of format is now recognized as a valid clock time when it comes to resuming it.
---
 lisp/org-clock.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 7fa15e0..48a0741 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -558,7 +558,7 @@ the clocking selection, associated with the letter `d'."
 		   (looking-at
 		    (concat "^[ \t]* " org-clock-string
 			    " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
-			    " +\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
+			    " +\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
 	      (message "Matched %s" (match-string 1))
 	      (setq ts (concat "[" (match-string 1) "]"))
 	      (goto-char (match-end 1))
-- 
1.6.0.4


[-- Attachment #3: Type: text/plain, Size: 44 bytes --]


Comments are welcome.

-- 
Nicolas Goaziou

[-- Attachment #4: 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 related	[flat|nested] 8+ messages in thread

* Re: suggestion for a fix to org-clock-in
  2009-07-28 19:48 suggestion for a fix to org-clock-in Nicolas Goaziou
@ 2009-07-29  5:46 ` Bastien
  2009-07-29  9:13   ` Sébastien Vauban
  2009-08-03  4:34 ` Carsten Dominik
  1 sibling, 1 reply; 8+ messages in thread
From: Bastien @ 2009-07-29  5:46 UTC (permalink / raw)
  To: emacs-orgmode

Nicolas Goaziou <n.goaziou@neuf.fr> writes:

> For some time zone reason, my time-stamps look like this [2009-07-28
> mar.]. Notice the dot after the name of the day.

It's because Emacs recently changed the format for abbreviated days.  
If you could track when this change appeared, that'd be nice.

> This prevents the regexp inside org-clock-in to recognize it as a valid
> clock format as thus to resume any started clock.
>
> I suggest the following simple patch.

Applied, thanks!

-- 
 Bastien

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

* Re: suggestion for a fix to org-clock-in
  2009-07-29  5:46 ` Bastien
@ 2009-07-29  9:13   ` Sébastien Vauban
  2009-07-29  9:45     ` Bastien
  2009-07-31 14:18     ` Sébastien Vauban
  0 siblings, 2 replies; 8+ messages in thread
From: Sébastien Vauban @ 2009-07-29  9:13 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Bastien wrote:
> Nicolas Goaziou <n.goaziou-8puV8OjpVw0@public.gmane.org> writes:
>
>> For some time zone reason, my time-stamps look like this [2009-07-28
>> mar.]. Notice the dot after the name of the day.
>
> It's because Emacs recently changed the format for abbreviated days.
> If you could track when this change appeared, that'd be nice.

Isn't it simply the way it always has been for French abbreviations of
weekdays?

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: suggestion for a fix to org-clock-in
  2009-07-29  9:13   ` Sébastien Vauban
@ 2009-07-29  9:45     ` Bastien
  2009-07-31 14:18     ` Sébastien Vauban
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2009-07-29  9:45 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Isn't it simply the way it always has been for French abbreviations of
> weekdays?

I might be wrong but I don't think so.  

I even remember I found this weird to have this dot after the
abbreviation - I thought: "Gee, this will break things in Org."
I looked for broken functions and couldn't find some.  

I'm nearly glad someone found one :)

-- 
 Bastien

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

* Re: suggestion for a fix to org-clock-in
  2009-07-29  9:13   ` Sébastien Vauban
  2009-07-29  9:45     ` Bastien
@ 2009-07-31 14:18     ` Sébastien Vauban
  1 sibling, 0 replies; 8+ messages in thread
From: Sébastien Vauban @ 2009-07-31 14:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

> Bastien wrote:
>> Nicolas Goaziou <n.goaziou-8puV8OjpVw0@public.gmane.org> writes:
>>
>>> For some time zone reason, my time-stamps look like this [2009-07-28
>>> mar.]. Notice the dot after the name of the day.
>>
>> It's because Emacs recently changed the format for abbreviated days.
>> If you could track when this change appeared, that'd be nice.
>
> Isn't it simply the way it always has been for French abbreviations of
> weekdays?

I confirm you, having tested it, that the point is there when under EmacsW32
and French regional settings for Windows.

Seb

-- 
Sébastien Vauban



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: suggestion for a fix to org-clock-in
  2009-07-28 19:48 suggestion for a fix to org-clock-in Nicolas Goaziou
  2009-07-29  5:46 ` Bastien
@ 2009-08-03  4:34 ` Carsten Dominik
  2009-08-03  8:34   ` Nicolas Goaziou
  1 sibling, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2009-08-03  4:34 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi,

I think the dot after the abbreviated month should be considered a bug.
What locales are doing this?  Maybe send a bug report to Emacs?

- Carsten

On Jul 28, 2009, at 9:48 PM, Nicolas Goaziou wrote:

> Hello,
>
> For some time zone reason, my time-stamps look like this [2009-07-28
> mar.]. Notice the dot after the name of the day.
>
> This prevents the regexp inside org-clock-in to recognize it as a  
> valid
> clock format as thus to resume any started clock.
>
> I suggest the following simple patch.
>
> From 0f149d1e515d017fed78fc5038127970843f9e81 Mon Sep 17 00:00:00 2001
> From: Nicolas Goaziou <nicolas@Misty.(none)>
> Date: Tue, 28 Jul 2009 20:55:06 +0200
> Subject: [PATCH] Teach org-clock-in about other date formats
>
> Depending on your time zone, the timestamps can have somewhat  
> differents formats (ex.: [2009-07-28 mar. 21:00]).
> This kind of format is now recognized as a valid clock time when it  
> comes to resuming it.
> ---
> lisp/org-clock.el |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lisp/org-clock.el b/lisp/org-clock.el
> index 7fa15e0..48a0741 100644
> --- a/lisp/org-clock.el
> +++ b/lisp/org-clock.el
> @@ -558,7 +558,7 @@ the clocking selection, associated with the  
> letter `d'."
> 		   (looking-at
> 		    (concat "^[ \t]* " org-clock-string
> 			    " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
> -			    " +\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
> +			    " +\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
> 	      (message "Matched %s" (match-string 1))
> 	      (setq ts (concat "[" (match-string 1) "]"))
> 	      (goto-char (match-end 1))
> -- 
> 1.6.0.4
>
>
> Comments are welcome.
>
> -- 
> Nicolas Goaziou
> _______________________________________________
> 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] 8+ messages in thread

* Re: suggestion for a fix to org-clock-in
  2009-08-03  4:34 ` Carsten Dominik
@ 2009-08-03  8:34   ` Nicolas Goaziou
  2009-08-03  9:05     ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2009-08-03  8:34 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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

> Hi,
>
> I think the dot after the abbreviated month should be considered a bug.
> What locales are doing this?  Maybe send a bug report to Emacs?
>
> - Carsten

Hello,

Actually, the dot is after the abbreviated day. The locale is
fr_FR.UTF-8.

I'm not sure it is a bug as it is typographically correct and because
'date +%a' gives me the same result.

-- 
Nicolas Goaziou

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

* Re: suggestion for a fix to org-clock-in
  2009-08-03  8:34   ` Nicolas Goaziou
@ 2009-08-03  9:05     ` Carsten Dominik
  0 siblings, 0 replies; 8+ messages in thread
From: Carsten Dominik @ 2009-08-03  9:05 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


On Aug 3, 2009, at 10:34 AM, Nicolas Goaziou wrote:

> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> Hi,
>>
>> I think the dot after the abbreviated month should be considered a  
>> bug.
>> What locales are doing this?  Maybe send a bug report to Emacs?
>>
>> - Carsten
>
> Hello,
>
> Actually, the dot is after the abbreviated day. The locale is
> fr_FR.UTF-8.
>
> I'm not sure it is a bug as it is typographically correct and because
> 'date +%a' gives me the same result.

But it seems to be like this only in this specific locale....

- Carsten

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

end of thread, other threads:[~2009-08-03  9:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-28 19:48 suggestion for a fix to org-clock-in Nicolas Goaziou
2009-07-29  5:46 ` Bastien
2009-07-29  9:13   ` Sébastien Vauban
2009-07-29  9:45     ` Bastien
2009-07-31 14:18     ` Sébastien Vauban
2009-08-03  4:34 ` Carsten Dominik
2009-08-03  8:34   ` Nicolas Goaziou
2009-08-03  9:05     ` Carsten Dominik

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