emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
@ 2010-05-10 14:48 Bernt Hansen
  2010-05-10 16:33 ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2010-05-10 14:48 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

After updating to master this morning my clock data is no longer inside
my clock drawer.  Logbook drawers (for state changes) also do not end up
inside the drawer anymore.

org-log-into-drawer is a variable defined in `org.el'.
Its value is t

org-clock-into-drawer is a variable defined in `org-clock.el'.
Its value is "CLOCK"

The following task was created and clocked in and this is what I see:

,----
| * New task
|   :CLOCK:    
| :END:
| 
| CLOCK: [2010-05-10 Mon 10:31]
`----

This was broken by commit

9e9f083aa921f1124e9d405ef560550702210633 is the first bad commit
commit 9e9f083aa921f1124e9d405ef560550702210633
Author: Carsten Dominik <carsten.dominik@gmail.com>
Date:   Sat May 8 17:10:14 2010 +0200

    Fix comment syntax in org-mode
    
    Patch by Leo.
    
    If this works, we have fixed an issue that has bugged me for several
    years.

:040000 040000 f0b0d5f4cfef5257c957ff9e19b84d309c5ea1e0 64581be3dd01b4783e02aa7c53f399a8931534b0 M	lisp

Regards,
Bernt



Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-09 on raven, modified by Debian
Package: Org-mode version 6.36trans (release_6.36.7.gae1eb)

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 14:48 Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)] Bernt Hansen
@ 2010-05-10 16:33 ` Carsten Dominik
  2010-05-10 17:04   ` Bernt Hansen
  2010-05-10 18:27   ` Leo
  0 siblings, 2 replies; 10+ messages in thread
From: Carsten Dominik @ 2010-05-10 16:33 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode

Hi Bernt,

can I ask you to try out which of the following lines (or both) cause  
the problem?

+  (org-set-local 'comment-start "#")
+  (modify-syntax-entry ?\n ">")

Could you comment one and then the other to check?

Thanks.

- Carsten


On May 10, 2010, at 4:48 PM, Bernt Hansen wrote:

>
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?   
> See
>
>     http://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org-mode mailing list.
> ------------------------------------------------------------------------
>
> After updating to master this morning my clock data is no longer  
> inside
> my clock drawer.  Logbook drawers (for state changes) also do not  
> end up
> inside the drawer anymore.
>
> org-log-into-drawer is a variable defined in `org.el'.
> Its value is t
>
> org-clock-into-drawer is a variable defined in `org-clock.el'.
> Its value is "CLOCK"
>
> The following task was created and clocked in and this is what I see:
>
> ,----
> | * New task
> |   :CLOCK:
> | :END:
> |
> | CLOCK: [2010-05-10 Mon 10:31]
> `----
>
> This was broken by commit
>
> 9e9f083aa921f1124e9d405ef560550702210633 is the first bad commit
> commit 9e9f083aa921f1124e9d405ef560550702210633
> Author: Carsten Dominik <carsten.dominik@gmail.com>
> Date:   Sat May 8 17:10:14 2010 +0200
>
>    Fix comment syntax in org-mode
>
>    Patch by Leo.
>
>    If this works, we have fixed an issue that has bugged me for  
> several
>    years.
>
> :040000 040000 f0b0d5f4cfef5257c957ff9e19b84d309c5ea1e0  
> 64581be3dd01b4783e02aa7c53f399a8931534b0 M	lisp
>
> Regards,
> Bernt
>
>
>
> Emacs  : GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11)
> of 2008-11-09 on raven, modified by Debian
> Package: Org-mode version 6.36trans (release_6.36.7.gae1eb)
>
> _______________________________________________
> 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

- Carsten

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 16:33 ` Carsten Dominik
@ 2010-05-10 17:04   ` Bernt Hansen
  2010-05-10 18:27   ` Leo
  1 sibling, 0 replies; 10+ messages in thread
From: Bernt Hansen @ 2010-05-10 17:04 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

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

> Hi Bernt,
>
> can I ask you to try out which of the following lines (or both) cause
> the problem?
>
> +  (org-set-local 'comment-start "#")

Commenting out this doesn't change the behaviour.

> +  (modify-syntax-entry ?\n ">")

Commenting out this fixes the problem for me.

Regards,
Bernt
>
> Could you comment one and then the other to check?
>
> Thanks.
>
> - Carsten

	Modified lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index d37e64c..7379fff 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4452,7 +4452,7 @@ The following commands are available:
   (org-set-local 'comment-start "#")
   (org-set-local 'comment-padding " ")
   (modify-syntax-entry ?# "<")
-  (modify-syntax-entry ?\n ">")
+  ;(modify-syntax-entry ?\n ">")
 
   ;; Align options lines
   (org-set-local

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 16:33 ` Carsten Dominik
  2010-05-10 17:04   ` Bernt Hansen
@ 2010-05-10 18:27   ` Leo
  2010-05-10 18:50     ` Bernt Hansen
  1 sibling, 1 reply; 10+ messages in thread
From: Leo @ 2010-05-10 18:27 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bernt Hansen, emacs-orgmode

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

On 2010-05-10 17:33 +0100, Carsten Dominik wrote:
> Hi Bernt,
>
> can I ask you to try out which of the following lines (or both) cause
> the problem?
>
> +  (org-set-local 'comment-start "#")
> +  (modify-syntax-entry ?\n ">")
>
> Could you comment one and then the other to check?
>
> Thanks.
>
> - Carsten

On 2010-05-10 18:04 +0100, Bernt Hansen wrote:
> 	Modified lisp/org.el
> diff --git a/lisp/org.el b/lisp/org.el
> index d37e64c..7379fff 100644
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -4452,7 +4452,7 @@ The following commands are available:
>    (org-set-local 'comment-start "#")
>    (org-set-local 'comment-padding " ")
>    (modify-syntax-entry ?# "<")
> -  (modify-syntax-entry ?\n ">")
> +  ;(modify-syntax-entry ?\n ">")
>  
>    ;; Align options lines
>    (org-set-local

This problem doesn't arise in emacs 23. I have tested it with current
stable release 23.2 and an old build from 2008 23.0.60 and they behave
as expected with org mode pulled from git today.

Here's a screenshot to demonstrate.


[-- Attachment #2: org-mode-clock.png --]
[-- Type: image/png, Size: 25990 bytes --]

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


I will see if I can provide a fix for emacs 22.

Best wishes,
Leo

[-- Attachment #4: 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] 10+ messages in thread

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 18:27   ` Leo
@ 2010-05-10 18:50     ` Bernt Hansen
  2010-05-10 21:05       ` Leo
  0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2010-05-10 18:50 UTC (permalink / raw)
  To: Leo; +Cc: emacs-orgmode, Carsten Dominik

Leo <sdl.web@gmail.com> writes:

> On 2010-05-10 17:33 +0100, Carsten Dominik wrote:
>> Hi Bernt,
>>
>> can I ask you to try out which of the following lines (or both) cause
>> the problem?
>>
>> +  (org-set-local 'comment-start "#")
>> +  (modify-syntax-entry ?\n ">")
>>
>> Could you comment one and then the other to check?
>>
>> Thanks.
>>
>> - Carsten
>
> On 2010-05-10 18:04 +0100, Bernt Hansen wrote:
>> 	Modified lisp/org.el
>> diff --git a/lisp/org.el b/lisp/org.el
>> index d37e64c..7379fff 100644
>> --- a/lisp/org.el
>> +++ b/lisp/org.el
>> @@ -4452,7 +4452,7 @@ The following commands are available:
>>    (org-set-local 'comment-start "#")
>>    (org-set-local 'comment-padding " ")
>>    (modify-syntax-entry ?# "<")
>> -  (modify-syntax-entry ?\n ">")
>> +  ;(modify-syntax-entry ?\n ">")
>>  
>>    ;; Align options lines
>>    (org-set-local
>
> This problem doesn't arise in emacs 23. I have tested it with current
> stable release 23.2 and an old build from 2008 23.0.60 and they behave
> as expected with org mode pulled from git today.

Actually I got this to occur both in emacs 22 and on an older version of
Emacs 23 on windows today.

GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-03 on
LENNART-69DE564 (patched)

GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09
on raven, modified by Debian

Regards,
Bernt

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 18:50     ` Bernt Hansen
@ 2010-05-10 21:05       ` Leo
  2010-05-10 21:42         ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-05-10 21:05 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: emacs-orgmode, Carsten Dominik

On 2010-05-10 19:50 +0100, Bernt Hansen wrote:
> Actually I got this to occur both in emacs 22 and on an older version of
> Emacs 23 on windows today.
>
> GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-03 on
> LENNART-69DE564 (patched)
>
> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-09
> on raven, modified by Debian
>
> Regards,
> Bernt

You are right. Sorry I didn't use the clock in/out much. The problem is
once :CLOCK: is inserted the second run doesn't trigger the problem any
more. Could you try the patch below and see if it fixes the issue?

The cause:

After changing the syntax of \n to mean the end of comment, it is no
longer a whitespace. Thus regexp like \S- will match it. Unfortunately
we didn't fix the comment-end syntax earlier so regexps relying on
syntax might be different. But I believe it is still better setting a
correct comment end and fixing the rest.

Carsten, could you check whether the following change still matches the
full set of properties allowed?

diff --git a/lisp/org/org.el b/lisp/org/org.el
index 96b4145..9727852 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -16976,12 +16976,12 @@ which make use of the date at the cursor."
       (save-excursion (org-indent-line-to column)))
     (setq column (current-column))
     (beginning-of-line 1)
-    (if (looking-at
-	 "\\([ \t]+\\)\\(:[-_0-9a-zA-Z]+:\\)[ \t]*\\(\\S-.*\\(\\S-\\|$\\)\\)")
-	(replace-match (concat (match-string 1)
-			       (format org-property-format
-				       (match-string 2) (match-string 3)))
-		       t t))
+    (when (re-search-forward "\\([ \t]+\\)\\(:[-_0-9a-zA-Z]+:\\)[ \t]*\\(\\S-.*\\S-\\)"
+			     (line-end-position) t)
+      (replace-match (concat (match-string 1)
+			     (format org-property-format
+				     (match-string 2) (match-string 3)))
+		     t t))
     (org-move-to-column column)))
 
 (defun org-set-autofill-regexps ()

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 21:05       ` Leo
@ 2010-05-10 21:42         ` Carsten Dominik
  2010-05-10 22:02           ` Leo
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2010-05-10 21:42 UTC (permalink / raw)
  To: Leo; +Cc: Bernt Hansen, emacs-orgmode


On May 10, 2010, at 11:05 PM, Leo wrote:

> On 2010-05-10 19:50 +0100, Bernt Hansen wrote:
>> Actually I got this to occur both in emacs 22 and on an older  
>> version of
>> Emacs 23 on windows today.
>>
>> GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-03 on
>> LENNART-69DE564 (patched)
>>
>> GNU Emacs 22.2.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of  
>> 2008-11-09
>> on raven, modified by Debian
>>
>> Regards,
>> Bernt
>
> You are right. Sorry I didn't use the clock in/out much. The problem  
> is
> once :CLOCK: is inserted the second run doesn't trigger the problem  
> any
> more. Could you try the patch below and see if it fixes the issue?
>
> The cause:
>
> After changing the syntax of \n to mean the end of comment, it is no
> longer a whitespace. Thus regexp like \S- will match it.

Hi Leo, I did not realize that this change will make \S- match \n.
think I have to take this change back then.  I do not oversee in
any way how many regexps might break because of this.  This would
require a careful check of much of Org.

- Carsten

> Unfortunately
> we didn't fix the comment-end syntax earlier so regexps relying on
> syntax might be different. But I believe it is still better setting a
> correct comment end and fixing the rest.
>
> Carsten, could you check whether the following change still matches  
> the
> full set of properties allowed?
>
> diff --git a/lisp/org/org.el b/lisp/org/org.el
> index 96b4145..9727852 100644
> --- a/lisp/org/org.el
> +++ b/lisp/org/org.el
> @@ -16976,12 +16976,12 @@ which make use of the date at the cursor."
>       (save-excursion (org-indent-line-to column)))
>     (setq column (current-column))
>     (beginning-of-line 1)
> -    (if (looking-at
> -	 "\\([ \t]+\\)\\(:[-_0-9a-zA-Z]+:\\)[ \t]*\\(\\S-.*\\(\\S-\\|$\\)\ 
> \)")
> -	(replace-match (concat (match-string 1)
> -			       (format org-property-format
> -				       (match-string 2) (match-string 3)))
> -		       t t))
> +    (when (re-search-forward "\\([ \t]+\\)\\(:[-_0-9a-zA-Z]+:\\) 
> [ \t]*\\(\\S-.*\\S-\\)"
> +			     (line-end-position) t)
> +      (replace-match (concat (match-string 1)
> +			     (format org-property-format
> +				     (match-string 2) (match-string 3)))
> +		     t t))
>     (org-move-to-column column)))
>
> (defun org-set-autofill-regexps ()

- Carsten

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 21:42         ` Carsten Dominik
@ 2010-05-10 22:02           ` Leo
  2010-05-10 22:12             ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Leo @ 2010-05-10 22:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Bernt Hansen, emacs-orgmode

On 2010-05-10 22:42 +0100, Carsten Dominik wrote:
> Hi Leo, I did not realize that this change will make \S- match \n.

I was surprised too so I checked other modes and they have the same
behaviour.

> think I have to take this change back then. I do not oversee in any
> way how many regexps might break because of this. This would require a
> careful check of much of Org.

OK. Feel free to revert the change.

Leo

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 22:02           ` Leo
@ 2010-05-10 22:12             ` Carsten Dominik
  2010-05-10 22:27               ` Leo
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2010-05-10 22:12 UTC (permalink / raw)
  To: Leo; +Cc: Bernt Hansen, emacs-orgmode


On May 11, 2010, at 12:02 AM, Leo wrote:

> On 2010-05-10 22:42 +0100, Carsten Dominik wrote:
>> Hi Leo, I did not realize that this change will make \S- match \n.
>
> I was surprised too so I checked other modes and they have the same
> behaviour.
>
>> think I have to take this change back then. I do not oversee in any
>> way how many regexps might break because of this. This would  
>> require a
>> careful check of much of Org.
>
> OK. Feel free to revert the change.

Sorry about that, and thank you very much for the attempt!

- Carsten

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

* Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
  2010-05-10 22:12             ` Carsten Dominik
@ 2010-05-10 22:27               ` Leo
  0 siblings, 0 replies; 10+ messages in thread
From: Leo @ 2010-05-10 22:27 UTC (permalink / raw)
  To: emacs-orgmode

On 2010-05-10 23:12 +0100, Carsten Dominik wrote:
>> OK. Feel free to revert the change.
>
> Sorry about that, and thank you very much for the attempt!

No worries, Carsten. We did find out the cause of the mysterious
auto-fill problem except the time to fix it has passed.

Leo

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

end of thread, other threads:[~2010-05-10 22:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-10 14:48 Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)] Bernt Hansen
2010-05-10 16:33 ` Carsten Dominik
2010-05-10 17:04   ` Bernt Hansen
2010-05-10 18:27   ` Leo
2010-05-10 18:50     ` Bernt Hansen
2010-05-10 21:05       ` Leo
2010-05-10 21:42         ` Carsten Dominik
2010-05-10 22:02           ` Leo
2010-05-10 22:12             ` Carsten Dominik
2010-05-10 22:27               ` Leo

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