minor refactor of bibtex module

This commit is contained in:
Patrick Elliott 2018-06-22 12:07:35 +02:00
parent 99902b29f9
commit b5cfd3afc0

View file

@ -171,10 +171,7 @@
(setq bibtex-completion-bibliography (list (expand-file-name +latex-bibtex-file))))
(unless (string-empty-p +latex-bibtex-dir)
(setq bibtex-completion-library-path (list +latex-bibtex-dir)
bibtex-completion-pdf-field "file"
bibtex-completion-notes-path (expand-file-name "notes.org" +latex-bibtex-dir)
bibtex-completion-pdf-open-function
(lambda (fpath) (async-start-process "open-pdf" "/usr/bin/xdg-open" nil fpath))))
bibtex-completion-notes-path (expand-file-name "notes.org" +latex-bibtex-dir)))
(define-key bibtex-mode-map (kbd "C-c \\") #'bibtex-fill-entry))
@ -194,12 +191,24 @@
(def-package! ivy-bibtex
:when (featurep! :completion ivy)
:commands ivy-bibtex
:config (setq ivy-bibtex-default-action 'ivy-bibtex-insert-key))
:config
(setq ivy-bibtex-default-action 'ivy-bibtex-insert-key)
(unless (string-empty-p +latex-bibtex-file)
(setq bibtex-completion-bibliography (list (expand-file-name +latex-bibtex-file))))
(unless (string-empty-p +latex-bibtex-dir)
(setq bibtex-completion-library-path (list +latex-bibtex-dir)
bibtex-completion-notes-path (expand-file-name "notes.org" +latex-bibtex-dir))))
(def-package! helm-bibtex
:when (featurep! :completion helm)
:commands helm-bibtex)
:commands helm-bibtex
:config
(unless (string-empty-p +latex-bibtex-file)
(setq bibtex-completion-bibliography (list (expand-file-name +latex-bibtex-file))))
(unless (string-empty-p +latex-bibtex-dir)
(setq bibtex-completion-library-path (list +latex-bibtex-dir)
bibtex-completion-notes-path (expand-file-name "notes.org" +latex-bibtex-dir))))
(def-package! company-auctex