[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what would cause failure in template for org capture?

From: No Wayman
Subject: Re: what would cause failure in template for org capture?
Date: Fri, 23 Jul 2021 23:03:30 -0400
User-agent: mu4e 1.5.14; emacs 28.0.50

from an earlier thread, I recall you mentioned you were using native
compilation? This is almost certainly the cause of your problem.

This does smell like a byte-compilation problem.
Seems to be a failure with any interactive, single-character %-escaped patterns in a template string (e.g. %^g, %^C, %^t). I've narrowed it down to a call to pcase in `org-capture-fill-template'. As Eric mentions, the problem disappears if the function is re-evaluated/instrumented. I have disabled native compilation and the problem persists with just a freshly byte-compiled elc of org-capture.
Tested this with the following recipe:

1. eval the following:
(org-capture-fill-template "%^t") ;fails with `unrecognized template placeholder: %^t` 2. eval org-capture-fill-template's definition, and then re-eval the above. Works properly. User is prompted for a time. 3. byte compile org-capture-fill-template: (byte-compile #'org-capture-fill-template)
4. eval (org-capture-fill-template "%^t") ; error is back

Running Emacs 28.0.50
Repository revision: 903ecd7bea7d8f99a7dc84150728219283d79bf0
Repository branch: master

reply via email to

[Prev in Thread] Current Thread [Next in Thread]