From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Guerry Subject: [Accepted] org-agenda: fix regexp in progress for state logging Date: Wed, 26 Jan 2011 18:25:43 +0100 (CET) Message-ID: <20110126172543.A85983FC8D@myhost.localdomain> References: <1296057132-14557-1-git-send-email-julien@danjou.info> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=37700 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pi98F-0007VR-Bg for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 12:26:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pi98A-0001kq-8i for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 12:26:08 -0500 Received: from mail-ew0-f41.google.com ([209.85.215.41]:59026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pi989-0001kY-US for emacs-orgmode@gnu.org; Wed, 26 Jan 2011 12:26:06 -0500 Received: by ewy27 with SMTP id 27so295750ewy.0 for ; Wed, 26 Jan 2011 09:26:04 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 > X-Patchwork-Id: 562 > Message-Id: <1296057132-14557-1-git-send-email-julien@danjou.info> > To: emacs-orgmode@gnu.org > 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 > > --- > 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)) >