From: Don Armstrong Date: Wed, 11 Feb 2015 22:33:51 +0000 (-0800) Subject: add papers pdf X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ff5921cd8809eb4e2b45243407ef05f9a22f3859;p=lib.git add papers pdf --- diff --git a/emacs_el/configuration/org-mode-configuration.el b/emacs_el/configuration/org-mode-configuration.el index 4e0a536..8f37789 100644 --- a/emacs_el/configuration/org-mode-configuration.el +++ b/emacs_el/configuration/org-mode-configuration.el @@ -363,7 +363,7 @@ Maildir, or by Message-ID." '((?b . "[[bib:%l][%l-bib]]") (?n . "[[notes:%l][%l-notes]]") (?c . "\\cite{%l}") - (?h . "*** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l paper]]"))) + (?h . "*** %t\n:PROPERTIES:\n:Custom_ID: %l\n:END:\n[[papers:%l][%l xoj]] [[papers-pdf:%l][pdf]]"))) )) (define-key org-mode-map (kbd "C-c )") 'reftex-citation) (define-key org-mode-map (kbd "C-c [") 'reftex-citation) @@ -383,6 +383,13 @@ Maildir, or by Message-ID." (format "%s %s" (substitute-in-file-name "$HOME/bin/bibtex_to_paper") bibtexkey))) (org-add-link-type "papers" 'open-research-paper) +(defun open-research-paper-pdf (bibtexkey) + "Open a paper pdf by bibtex key" + (interactive "bibtex key: ") + (shell-command + (format "%s -p evince %s" + (substitute-in-file-name "$HOME/bin/bibtex_to_paper") bibtexkey))) +(org-add-link-type "papers-pdf" 'open-research-paper-pdf) (add-to-list 'org-link-abbrev-alist '("notes" .