The initial idea is from #381. Their docstrings are quite extensive.
I've written four functions and one variable,
the function find-key-from-file delegates finding key to every function in the new variable find-key-functions each takes one argument called FILENAME.
The find-key-functions includes
find-key-from-note, a function that returns a list of key associated with FILENAME and bibtex-completion-notes-path depending on its value.
find-key-from-pdf, thats use another new function get-entry-with-string (See description in #381. TLDR; list every entry with STRING in its fields.) to return a list of entries with FILENAME in its fields then extract the "=key=" field from each entry in the list or just return the BibTex part of FILENAME in a list.
The initial idea is from #381. Their docstrings are quite extensive. I've written four functions and one variable, the function
find-key-from-file
delegates finding key to every function in the new variablefind-key-functions
each takes one argument called FILENAME.The
find-key-functions
includesfind-key-from-note
, a function that returns a list of key associated with FILENAME andbibtex-completion-notes-path
depending on its value.find-key-from-pdf
, thats use another new functionget-entry-with-string
(See description in #381. TLDR; list every entry with STRING in its fields.) to return a list of entries with FILENAME in its fields then extract the"=key="
field from each entry in the list or just return the BibTex part of FILENAME in a list.