1 line
2 KiB
Plaintext
1 line
2 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>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:</p> <pre><code>(defun my/citar-ebib-notes-format-wrapper (key _entry _filepath) "Wrapper so that citar's notes function can inherit from ebib's. </code></pre> <p>Passes KEY to <code>ebib--notes-fill-template', along with the value of</code>ebib--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)))))</p> <p>This only works while ebib is running. While it's not running I get an error message <code>format-spec: Invalid format character: ‘%T</code>, which is strange, because the formatting <em>seems</em> to rely on <code>ebib-notes-template-specifiers</code>, which I don't change, and which is initialised in <code>ebib-notes.el</code> (so should be available when the body of the function runs). Changing the notes template variable so that it doesn't include <code>%T</code> helps, and iterating on this reveals that the formatter errors for all specifiers except <code>%K</code>, which it handles fine. I'm very confused.</p> <p>I've tried everything I can think of to get this to work, to no avail. What's going on? Any help greatly appreciated!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/Jack-o-tall-tales"> /u/Jack-o-tall-tales </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/raif60/ebib_cant_format_anything_except_the_k_spec_in/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/raif60/ebib_cant_format_anything_except_the_k_spec_in/">[comments]</a></span> |