emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@gmail.com>
To: Bernt Hansen <bernt@norang.ca>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Bug: Clock data and log messages no longer in drawers [6.36trans (release_6.36.7.gae1eb)]
Date: Mon, 10 May 2010 22:05:17 +0100	[thread overview]
Message-ID: <m1r5ljsc1e.fsf@cam.ac.uk> (raw)
In-Reply-To: <877hnb7fs1.fsf@gollum.intra.norang.ca> (Bernt Hansen's message of "Mon, 10 May 2010 14:50:06 -0400")

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

  reply	other threads:[~2010-05-10 21:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=m1r5ljsc1e.fsf@cam.ac.uk \
    --to=sdl.web@gmail.com \
    --cc=bernt@norang.ca \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).