From 5cf4158aa68974204ec74610708216216dab7c64 Mon Sep 17 00:00:00 2001 From: Correl Date: Sat, 18 Jul 2020 19:35:29 -0400 Subject: [PATCH] [emacs] add org-roam-bibtex --- .doom.d/config.org | 42 ++++++++++++++++++++++++++++++++++++++++-- .doom.d/init.el | 5 ++++- .doom.d/packages.el | 11 +++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/.doom.d/config.org b/.doom.d/config.org index db5bd87..cd609f8 100644 --- a/.doom.d/config.org +++ b/.doom.d/config.org @@ -57,6 +57,18 @@ version of the [[https://github.com/edwardtufte/et-book][Edward Tufte book font] :map +doom-dashboard-mode-map "g" #'my/dashboard-randomize) #+end_src +* BibTeX +#+begin_src emacs-lisp + (setq my/bibliographies + '("~/Documents/bibliography/references.bib" + "~/Documents/bibliography/calibre.bib")) +#+end_src +** Helm BibTeX +#+begin_src emacs-lisp + (setq bibtex-completion-bibliography + my/bibliographies) + (setq bibtex-completion-pdf-field "File") +#+end_src * Org :PROPERTIES: :header-args: :tangle no :noweb-ref org @@ -716,7 +728,18 @@ Load shared code snippets to be used in org documents. (org-journal-dir "~/org-aweber") (org-journal-date-format "%A, %d %B %Y")) #+end_src -** Add backlinks to org-roam exports +** Ref +#+begin_src emacs-lisp + (use-package! org-ref + :config + (setq reftex-default-bibliography my/bibliographies) + ;; see org-ref for use of these variables + (setq org-ref-bibliography-notes "~/Documents/bibliography/notes.org" + org-ref-default-bibliography my/bibliographies + org-ref-pdf-directory "~/Documents/bibliography/bibtex-pdfs/")) +#+end_src +** Roam +*** Add backlinks to org-roam exports Adapted from https://org-roam.readthedocs.io/en/master/org_export/. #+begin_src emacs-lisp @@ -749,7 +772,15 @@ Adapted from https://org-roam.readthedocs.io/en/master/org_export/. (add-hook 'org-export-before-processing-hook 'my/org-export-preprocessor) #+end_src -** Org Roam Server +*** Org Roam Bibtex +#+begin_src emacs-lisp + (use-package! org-roam-bibtex + :after org-roam + :hook (org-roam . org-roam-bibtex-mode) + :bind (:map org-mode-map + (("C-c n r a" . orb-note-actions)))) +#+end_src +*** Org Roam Server #+begin_src emacs-lisp (use-package! org-roam-server :commands org-roam-server-mode) @@ -1111,6 +1142,13 @@ Study kanji by overlaying hiragana readings. (use-package! kanji-glasses-mode :commands kanji-glasses-mode) #+end_src +* Nov Epub reader +#+begin_src emacs-lisp + (use-package! nov + :mode ("\\.epub\\'" . nov-mode) + :config + (setq nov-save-place-file (concat doom-cache-dir "nov-places"))) +#+end_src * Miscellaneous Nonsense ** BRING ON THE ... A silly interactive method for generating horizontal and vertical text. diff --git a/.doom.d/init.el b/.doom.d/init.el index ae733bf..4ce4312 100644 --- a/.doom.d/init.el +++ b/.doom.d/init.el @@ -84,7 +84,9 @@ (eval +overlay) ; run code, run (also, repls) ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation - +docsets) ; ...or in Dash docsets locally + +docsets ; ...or in Dash docsets locally + +dictionary + +offline) lsp macos ; MacOS-specific commands magit ; a git porcelain for Emacs @@ -136,6 +138,7 @@ +hugo ; use Emacs for hugo blogging +ipython ; ipython support for babel +journal ; a simple personal diary / journal + +noter +pandoc ; pandoc integration into org's exporter ;;+pomodoro ; be fruitful with the tomato technique +present ; using Emacs for presentations diff --git a/.doom.d/packages.el b/.doom.d/packages.el index d9b6dc7..f4c455b 100644 --- a/.doom.d/packages.el +++ b/.doom.d/packages.el @@ -25,3 +25,14 @@ (package! ox-dnd :recipe (:host github :repo "xeals/emacs-org-dnd")) (package! gnuplot) (package! org-roam-server) +(package! nov) +(package! org-ref) + +(package! org-roam-bibtex + :recipe (:host github :repo "org-roam/org-roam-bibtex")) + +;; When using org-roam via the `+roam` flag +(unpin! org-roam company-org-roam) + +;; When using bibtex-completion via the `biblio` module +(unpin! bibtex-completion helm-bibtex ivy-bibtex)