diff options
author | Julien Danjou <julien@danjou.info> | 2011-01-26 20:52:12 +0000 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-01-26 18:24:19 +0100 |
commit | 2d747caeab545d6693e54e42621d66fc37f0ab5f (patch) | |
tree | c97ae4a82f4900827ead98f76780434ede1c47c4 | |
parent | 9658a9909fd2b4da946893ae54cd9415c1ccd75c (diff) | |
download | org-mode-2d747caeab545d6693e54e42621d66fc37f0ab5f.tar.gz |
org-agenda: fix regexp in progress for state logging
* org-agenda.el (org-agenda-get-progress): Fix regexp for statep: it
must has \\ at the end of the line. This avoid matching the following
heading when there's no newline between the logged state and the next
heading.
Signed-off-by: Julien Danjou <julien@danjou.info>
-rw-r--r-- | lisp/org-agenda.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index c4fef57..057a142 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4850,15 +4850,15 @@ be skipped." (setq clocked (match-string 2 rest))) (setq clocked "-"))) (save-excursion - (setq extra nil) - (cond - ((not org-agenda-log-mode-add-notes)) - (statep - (and (looking-at ".*\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$") - (setq extra (match-string 1)))) - (clockp - (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$") - (setq extra (match-string 1))))) + (setq extra + (cond + ((not org-agenda-log-mode-add-notes) nil) + (statep + (and (looking-at ".*\\\\\n[ \t]*\\([^-\n \t].*?\\)[ \t]*$") + (match-string 1))) + (clockp + (and (looking-at ".*\n[ \t]*-[ \t]+\\([^-\n \t].*?\\)[ \t]*$") + (match-string 1))))) (if (not (re-search-backward "^\\*+ " nil t)) (setq txt org-agenda-no-heading-message) (goto-char (match-beginning 0)) |