From ff5921cd8809eb4e2b45243407ef05f9a22f3859 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 11 Feb 2015 14:33:51 -0800 Subject: [PATCH] add papers pdf --- emacs_el/configuration/org-mode-configuration.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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" . -- 2.39.5