Skip to content

Instantly share code, notes, and snippets.

@icymist
Last active August 29, 2015 14:15
Show Gist options
  • Save icymist/eb40a2ffb21d709c4532 to your computer and use it in GitHub Desktop.
Save icymist/eb40a2ffb21d709c4532 to your computer and use it in GitHub Desktop.
orgref-config.el
; orgref also requires helm
(require 'helm-config)
(autoload 'helm-bibtex "helm-bibtex" "" t)
(require 'json)
(setq starter-kit-dir "/home/chaitanya/.emacs.d/opt")
(setq org-load-path'())
(defun org-require (feature)
"Load a FEATURE from an org-file.
FEATURE is a symbol, and it is loaded from an org-file by the name of FEATURE.org, that is in the `org-load-path'. The FEATURE is loaded from `org-babel-load-file'."
(let ((org-file (concat (symbol-name feature) ".org"))
(path))
;; find the org-file
(catch 'result
(loop for dir in org-load-path do
(when (file-exists-p
(setq path
(expand-file-name
org-file
dir)))
(throw 'result path))))
(let ((default-directory (file-name-directory path)))
(org-babel-load-file path))))
;; https://github.com/jkitchin/org-ref
;; for loading org-files
(add-to-list 'org-load-path
(expand-file-name "org-ref" starter-kit-dir))
;; for loading emacs-lisp files
(add-to-list 'load-path
(expand-file-name "org-ref" starter-kit-dir))
(org-require 'org-ref)
(org-require 'doi-utils)
(org-require 'pubmed)
(require 'jmax-bibtex)
(setq reftex-default-bibliography '("~/work/mypapers/mynewrefs.bib"))
(setq org-ref-bibliography-notes "~/work/mypapers/notes.org"
org-ref-default-bibliography '("~/ownCloud/work/mypapers/mynewrefs.bib" "~/ownCloud/work/mypapers/KesselsWMM.bib")
org-ref-pdf-directory "/home/chaitanya/work/papers/")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment