I have org-capture-templates
defined as below and until today could capture and log my runs fine, but as of today they've stopped working...
(setq org-capture-templates
'(;; Computing
("c" "Computing")
("ce" "Emacs" entry (file+olp "~/org/computing.org" "Emacs")
"* TODO %t %?\n" :prepend t)
;; Exercise
("e" "Exercise")
("er" "Logging a run" table-line (file+olp "~/org/training/training.org" "Running" "Log")
"| %t | %? | km | min + s | | |" :prepend t)
("ec" "Logging a cycle" table-line (file+olp "~/org/training/training.org" "Cycling" "Log")
"| %t | %? | km | min + s | | |" :prepend t)))
Snippet of my ~/org/training/training.org
is...
* Running
** Log
#+NAME: running-log
#+CAPTION: Running Log
| Date | Route | Distance | Time | Pace | Notes |
|------------------+-------------------+----------+--------------+-------------------------------+-------------|
| <2021-01-03 Fri> | Shorter 12km run | 12.25km | 60min + 25s | 4 min / km + 55.918367 s / km | Less icey! |
| <2021-01-01 Fri> | Longer 16km run | 16.22km | 80min + 03s | 4 min / km + 56.115906 s / km | Icey! |
...and ~/org/computing.org
is...
* Emacs
** TODO <2020-11-11 Wed> vterm only on non-work computers.
If I C-c c
to start org-capture
and select [c]... Computing...
[e] Emacs
I'm prompted for an entry under * Emacs
in computing.org
and until today [e]... Exercise...
[r] Logging a run
brought up a blank template like...
| <2021-01-03 | <cursor here to start entry> | km | min + s | | |
...and I could enter details distance and time, save it and the entry appeared in the ~/org/training/training.org
with the pace calculated.
Now though I'm informed...
Capture abort: Symbol's function definition is void: assert
Debugging shows...
Debugger entered--Lisp error: (error "Capture abort: Symbol’s function definition is voi...")
signal(error ("Capture abort: Symbol’s function definition is voi..."))
error("Capture abort: %s" "Symbol’s function definition is void: assert")
org-capture(nil)
funcall-interactively(org-capture nil)
call-interactively(org-capture nil nil)
command-execute(org-capture)
...which doesn't mean much to me. If I look at the entry under [C] Customize org-capture-templates
I have...
[INS] [DEL] Choice: [Value Menu] Multikey description:
Keys : e
Description: Exercise
[INS] [DEL] Choice: [Value Menu] Template entry:
Keys : er
Description : Logging a run
Capture Type : [Value Menu] Table line
Target location: [Value Menu] File & Outline path:
Filename : [Value Menu] Literal: ~/org/training/training.org
Outline path:
[INS] [DEL] Headline: Running
[INS] [DEL] Headline: Log
[INS]
Template : [Value Menu] String: | %t | %? | km | min + s | | |
Plist:
[X] Key: :prepend t
[ ] Key: :immediate-finish t
[ ] Key: :jump-to-captured t
[ ] Key: :empty-lines 1
[ ] Key: :empty-lines-before 1
[ ] Key: :empty-lines-after 1
[ ] Key: :clock-in t
[ ] Key: :clock-keep t
[ ] Key: :clock-resume t
[ ] Key: :time-prompt t
[ ] Key: :tree-type week
[ ] Key: :unnarrowed t
[ ] Key: :table-line-pos String:
[ ] Key: :kill-buffer t
[INS]
Which looks fine to my untrained eye. Reading the C-h v org-capture-templates
(see also here, I don't see that anything has changed since I first wrote this.
I'm running GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22) of 2020-11-29
(recent compile date is because its under Gentoo). I run Emacs as a daemon and connect a client to it and tried first re-evaluating my org-capture-template
but with the same result. I then restarted the daemon and the error persisted.
I don't understand the debugging and why org-capture
is being called interactively with nil nil
arguments as I think I have defined the templates correctly and it worked fine until today. Any insight would be gratefully received.
EDIT (2021-01-03) :
After adding (require 'cl)
as suggested it still errors with the following backtrace...
Debugger entered--Lisp error: (error "Capture abort: Invalid function: assert")
signal(error ("Capture abort: Invalid function: assert"))
error("Capture abort: %s" "Invalid function: assert")
org-capture(nil)
funcall-interactively(org-capture nil)
call-interactively(org-capture nil nil)
command-execute(org-capture)
EDIT (2020-01-04) :
I found things still worked on a laptop, but then updated packages and org-capture broke in the same way there. The packages updated don't seem related to org but I'm detailing them here for reference...
company-20201214.1620
ein-20201217.1508
flycheck-20201214.2154
forge-20201212.905
magit-20201212.929
org-ref-20201126.1924
pass-20190830.2017
projectile-20201214.839
python-mode-20201218.751
pyvenv-20201210.1509
auctex-12.3.1
dash-20201215.59
dash-functional-20201215.40
ess-20201217.1440
git-commit-20201115.2313
helm-20201215.1623
helm-core-20201202.907
ivy-20201217.1559
key-chord-20160227.1238
markdown-mode-20201211.329
mpdel-20201026.1123
transient-20201205.1610
assert
is defined as an alias tocl-assert
incl.el
. It's not clear who is trying to call it, butcl.el
has been deprecated since emacs 27.1, so it may be that it used to be loaded but is not any longer. You can try(require 'cl)
and see if the error goes away, but that is only a stop-gap measure.Capture abort: Invalid function: assert
. I findcl.el
under/usr/share/emacs/27.1/lisp/obsolete/cl.el
, could there perhaps be a something underorg-mode
that relies on this and its worth reporting upstream? Found an old thread advising against use ofcl.el
.~/.config/emacs/
for a few years now.