[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 0260d2f 1/3: Allow multiple %(expression) instances
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 0260d2f 1/3: Allow multiple %(expression) instances in org-agenda-prefix-format |
Date: |
Mon, 26 Apr 2021 04:57:08 -0400 (EDT) |
branch: externals/org
commit 0260d2fcf603f30210e2b95d37727edd832c12e9
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Bastien Guerry <bzg@gnu.org>
Allow multiple %(expression) instances in org-agenda-prefix-format
* lisp/org-agenda.el (org-compile-prefix-format): Use non-greedy match
for %(expression).
Previously, format like "%-12.12s%(expr1) %(expr2)" would not be
parsed correctly because of greedy "(.+)" regexp used to match the
expressions.
---
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 5368f58..2c4624d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6927,7 +6927,7 @@ and stored in the variable `org-prefix-format-compiled'."
(t " %-12:c%?-12t% s")))
(start 0)
varform vars var c f opt) ;; e
- (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([
.;,:!?=|/<>]?\\)\\([cltseib]\\|(.+)\\)"
+ (while (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([
.;,:!?=|/<>]?\\)\\([cltseib]\\|(.+?)\\)"
s start)
(setq var (or (cdr (assoc (match-string 4 s)
'(("c" . category) ("t" . time) ("l" . level)
("s" . extra)