emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-agenda: fix regexp in progress for state logging
@ 2011-01-26 15:52 Julien Danjou
  2011-01-26 16:15 ` Giovanni Ridolfi
  2011-01-26 17:25 ` [Accepted] " Bastien Guerry
  0 siblings, 2 replies; 4+ messages in thread
From: Julien Danjou @ 2011-01-26 15:52 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Julien Danjou

* 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>
---
 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 3c1104e..6e8d07a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4814,15 +4814,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))
-- 
1.7.2.3

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

* Re: [PATCH] org-agenda: fix regexp in progress for state logging
  2011-01-26 15:52 [PATCH] org-agenda: fix regexp in progress for state logging Julien Danjou
@ 2011-01-26 16:15 ` Giovanni Ridolfi
  2011-01-26 16:51   ` Julien Danjou
  2011-01-26 17:25 ` [Accepted] " Bastien Guerry
  1 sibling, 1 reply; 4+ messages in thread
From: Giovanni Ridolfi @ 2011-01-26 16:15 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-orgmode

Julien Danjou <julien@danjou.info> writes:

Hi, Julien
> * 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
  it must have ?

cheers
Giovanni

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

* Re: [PATCH] org-agenda: fix regexp in progress for state logging
  2011-01-26 16:15 ` Giovanni Ridolfi
@ 2011-01-26 16:51   ` Julien Danjou
  0 siblings, 0 replies; 4+ messages in thread
From: Julien Danjou @ 2011-01-26 16:51 UTC (permalink / raw)
  To: Giovanni Ridolfi; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 369 bytes --]

On Wed, Jan 26 2011, Giovanni Ridolfi wrote:

> Julien Danjou <julien@danjou.info> writes:
>
> Hi, Julien
>> * 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
>   it must have ?

Yes, sorry, that's not a catz. :)

-- 
Julien Danjou
❱ http://julien.danjou.info

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

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

* [Accepted] org-agenda: fix regexp in progress for state logging
  2011-01-26 15:52 [PATCH] org-agenda: fix regexp in progress for state logging Julien Danjou
  2011-01-26 16:15 ` Giovanni Ridolfi
@ 2011-01-26 17:25 ` Bastien Guerry
  1 sibling, 0 replies; 4+ messages in thread
From: Bastien Guerry @ 2011-01-26 17:25 UTC (permalink / raw)
  To: emacs-orgmode

Patch 562 (http://patchwork.newartisans.com/patch/562/) is now "Accepted".

Maintainer comment: none

This relates to the following submission:

http://mid.gmane.org/%3C1296057132-14557-1-git-send-email-julien%40danjou.info%3E

Here is the original message containing the patch:

> Content-Type: text/plain; charset="utf-8"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Subject: [Orgmode] org-agenda: fix regexp in progress for state logging
> Date: Wed, 26 Jan 2011 20:52:12 -0000
> From: Julien Danjou <julien@danjou.info>
> X-Patchwork-Id: 562
> Message-Id: <1296057132-14557-1-git-send-email-julien@danjou.info>
> To: emacs-orgmode@gnu.org
> Cc: Julien Danjou <julien@danjou.info>
> 
> * 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>
> 
> ---
> 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 3c1104e..6e8d07a 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -4814,15 +4814,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))
> 

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

end of thread, other threads:[~2011-01-26 17:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 15:52 [PATCH] org-agenda: fix regexp in progress for state logging Julien Danjou
2011-01-26 16:15 ` Giovanni Ridolfi
2011-01-26 16:51   ` Julien Danjou
2011-01-26 17:25 ` [Accepted] " Bastien Guerry

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