all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [BUG] org-compile-prefix-format regexp change breaks eval forms [9.4.6 (9.4.6-gf72a65)]
@ 2021-05-26 23:42 Radon Rosborough
  2021-05-27  3:25 ` Ihor Radchenko
  0 siblings, 1 reply; 6+ messages in thread
From: Radon Rosborough @ 2021-05-26 23:42 UTC (permalink / raw)
  To: Emacs-orgmode

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


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

end of thread, other threads:[~2021-09-26  7:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-26 23:42 [BUG] org-compile-prefix-format regexp change breaks eval forms [9.4.6 (9.4.6-gf72a65)] Radon Rosborough
2021-05-27  3:25 ` Ihor Radchenko
2021-05-29 21:18   ` Radon Rosborough
2021-05-30  8:04     ` Ihor Radchenko
2021-05-30 16:48       ` Radon Rosborough
2021-09-26  7:12       ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.