emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Fix: (org-agenda-get-progress) Logbook list bullets with 2+ spaces
@ 2018-09-01  0:16 Adam Porter
  2018-09-02 12:30 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Porter @ 2018-09-01  0:16 UTC (permalink / raw)
  To: emacs-orgmode

Previously, logbook list entries with more than one space between the
bullet and the beginning of the entry would be ignored (i.e. if a
bullet is defined in org-list-two-spaces-after-bullet-regexp, two
spaces will be inserted after the bullet, and that prevents
state-changed entries from appearing in the Agenda Log Mode view).

This commit fixes this problem by accepting multiple spaces between
the list bullet and "State" in the state-change regexp.
---
 lisp/org-agenda.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index eaeddb6..a60fb60 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5733,7 +5733,7 @@ then those holidays will be skipped."
 		 (when (memq 'closed items) (concat "\\<" org-closed-string))
 		 (when (memq 'clock items) (concat "\\<" org-clock-string))
 		 (when (memq 'state items)
-		   (format "- State \"%s\".*?" org-todo-regexp)))))
+		   (format "- +State \"%s\".*?" org-todo-regexp)))))
 	 (parts-re (if parts (mapconcat 'identity parts "\\|")
 		     (error "`org-agenda-log-mode-items' is empty")))
 	 (regexp (concat
-- 
2.7.4

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

* Re: [PATCH] Fix: (org-agenda-get-progress) Logbook list bullets with 2+ spaces
  2018-09-01  0:16 [PATCH] Fix: (org-agenda-get-progress) Logbook list bullets with 2+ spaces Adam Porter
@ 2018-09-02 12:30 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-09-02 12:30 UTC (permalink / raw)
  To: Adam Porter; +Cc: emacs-orgmode

Hello,

Adam Porter <adam@alphapapa.net> writes:

> Previously, logbook list entries with more than one space between the
> bullet and the beginning of the entry would be ignored (i.e. if a
> bullet is defined in org-list-two-spaces-after-bullet-regexp, two
> spaces will be inserted after the bullet, and that prevents
> state-changed entries from appearing in the Agenda Log Mode view).

I tweaked the commit message to bend it to our conventions and applied
your patch.

Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-09-02 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-01  0:16 [PATCH] Fix: (org-agenda-get-progress) Logbook list bullets with 2+ spaces Adam Porter
2018-09-02 12:30 ` Nicolas Goaziou

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