I use ebib and citar. Both are awesome, but have different defaults when creating notes files for bibliographic entries. I wanted to unify them (so that my notes would always be of the same format). So I defined a wrapper function:

(defun my/citar-ebib-notes-format-wrapper (key _entry _filepath) "Wrapper so that citar's notes function can inherit from ebib's. 

Passes KEY to ebib--notes-fill-template', along with the value ofebib--cur-db' if defined, or the first item of `ebib-preload-bib-files' if not. _ENTRY and _FILEPATH are ignored." (require 'ebib-notes) (if-let ((cell (ebib--notes-create-new-note key (or ebib--cur-db (car ebib-preload-bib-files))))) (progn (display-buffer (car cell)) (goto-char (cdr cell)))))

This only works while ebib is running. While it's not running I get an error message format-spec: Invalid format character: ‘%T, which is strange, because the formatting seems to rely on ebib-notes-template-specifiers, which I don't change, and which is initialised in ebib-notes.el (so should be available when the body of the function runs). Changing the notes template variable so that it doesn't include %T helps, and iterating on this reveals that the formatter errors for all specifiers except %K, which it handles fine. I'm very confused.

I've tried everything I can think of to get this to work, to no avail. What's going on? Any help greatly appreciated!

submitted by /u/Jack-o-tall-tales
[link] [comments]