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

_______________________________________________
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

Reply via email to