diff options
author | Kyle Meyer <kyle@kyleam.com> | 2014-05-01 21:53:24 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2014-05-01 21:53:24 -0400 |
commit | 04c2eaca647afb3da42cd62574c7380d895afd6c (patch) | |
tree | ed6cd5b8519ddbaf1a6b4aacb8dc84d88fa97ef2 /bog.el | |
parent | 8c537918048e91329c538034dd6cc82e09deb3d2 (diff) | |
download | bog-04c2eaca647afb3da42cd62574c7380d895afd6c.tar.gz |
Fix bog-bib-citekeys when bog-bib-file is non-nil
Diffstat (limited to 'bog.el')
-rw-r--r-- | bog.el | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -483,11 +483,16 @@ occur in buffer instead of alphabetical order." (expand-file-name (concat citekey ".bib") bog-bib-directory)) (defun bog-bib-citekeys () - "Return a list citekeys for all BibTeX files in `bog-bib-directory'." - (-map 'file-name-base - (file-expand-wildcards (concat - (file-name-as-directory bog-bib-directory) - "*.bib")))) + "Return a list citekeys for all BibTeX entries. +If `bog-bib-file' is non-nil, it returns citekeys from this file +instead of citekeys from file names in `bog-bib-directory'." + (if bog-bib-file + (with-current-buffer (find-file-noselect bog-bib-file) + (-map 'car (bibtex-parse-keys))) + (-map 'file-name-base + (file-expand-wildcards (concat + (file-name-as-directory bog-bib-directory) + "*.bib"))))) ;;; Web |