tmalsburg / helm-bibtex

Search and manage bibliographies in Emacs
GNU General Public License v2.0
464 stars 74 forks source link

bibtex-find-key-from-file function #382

Closed c1-g closed 3 years ago

c1-g commented 3 years ago

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

  1. find-key-from-note, a function that returns a list of key associated with FILENAME and bibtex-completion-notes-path depending on its value.

  2. 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.

c1-g commented 3 years ago

https://github.com/tmalsburg/helm-bibtex/issues/381 Answers has solve my problem! Thanks!