I have this org capture template saved in a tpl-quote.txt
file:
* a title
:PROPERTIES:
:TIME: %U
:END:
%x ;; contents in clipboard
And the org-capture-templates
is
(setq org-capture-templates
(quote (("p" "Private Templates")
("pc" "Clipboard"
entry
(file+olp+datetree "~/Notebooks/org/default.org" "Capture")
(file "~/Notebooks/org/tpl-quote.txt")
:immediate-finish t))))
This worked alright in GUI Emacs.
If I start a GUI Emacs, run M-x server-start
, then in a terminal run
emacsclient -ne '(org-capture nil "pc")'
it also worked Ok.
But if I start Emacs daemon emacs --daemon
, then run the above emacsclient
command I got the following error at my terminal:
*ERROR*: Capture abort: (wrong-type-argument char-or-string-p nil)
So it seems that the clipboard expansion %x is only working with GUI Emacs, deleting the %x it works again.
Is this the expected behavior?
My setup:
- OS: Manjaro Linux
- Emacs: 26.3
- Org-mode: 9.1.9