[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUG] org-compile-prefix-format regexp change breaks eval forms [9.4.6 (
From: |
Radon Rosborough |
Subject: |
[BUG] org-compile-prefix-format regexp change breaks eval forms [9.4.6 (9.4.6-gf72a65)] |
Date: |
Wed, 26 May 2021 16:42:30 -0700 |
Hello,
In commit 0260d2fcf603f30210e2b95d37727edd832c12e9 of 2021-04-26, the
regexp used in `org-agenda-prefix-format' was updated to use a
non-greedy regexp, in order to allow multiple %(expression) instances
in `org-agenda-prefix-format'. Unfortunately, this change breaks the
ability to use nested forms in %(expression) instances. For example, I
use the following setting for `org-agenda-prefix-format':
(setf (alist-get 'agenda org-agenda-prefix-format)
" %(format-time-string \"%a\" (org-get-deadline-time (point))) ")
When running `org-agenda', I now receive the error
`org-compile-prefix-format: End of file during parsing'. This is
because of the updated regexp match, which stops at the first closing
parenthesis:
ELISP> myfmt
" %(format-time-string \"%a\" (org-get-deadline-time (point))) "
ELISP> (and (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([
.;,:!?=|/<>]?\\)\\([cltseib]\\|(.+?)\\)" myfmt) (match-string 4
myfmt))
"(format-time-string \"%a\" (org-get-deadline-time (point)"
With the previous regexp, it works fine:
ELISP> (and (string-match "%\\(\\?\\)?\\([-+]?[0-9.]*\\)\\([
.;,:!?=|/<>]?\\)\\([cltseib]\\|(.+)\\)" myfmt) (match-string 4 myfmt))
"(format-time-string \"%a\" (org-get-deadline-time (point)))"
Thanks,
Radon Rosborough
- [BUG] org-compile-prefix-format regexp change breaks eval forms [9.4.6 (9.4.6-gf72a65)],
Radon Rosborough <=