From: John Kitchin Date: Thu, 23 Apr 2015 13:59:51 +0000 (-0400) Subject: Merge branch 'journaltitle' of https://github.com/brabalan/org-ref into brabalan... X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=4b6fd70d429fd8d3268bd7ce05a84864af098c74;hp=035dfe3e9315b761322a38f9f7db243209c7c25c Merge branch 'journaltitle' of https://github.com/brabalan/org-ref into brabalan-journaltitle --- diff --git a/.travis.yml b/.travis.yml index 1f94d83..d51906f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ language: emacs-lisp + +env: + matrix: + - emacs=emacs-snapshot + before_install: - # PPA for stable Emacs packages - - sudo add-apt-repository -y ppa:cassou/emacs - # PPA for Emacs nightlies - sudo add-apt-repository -y ppa:ubuntu-elisp/ppa - # Update and install the Emacs for our environment - sudo apt-get update -qq - - sudo apt-get install -qq -yy ${EMACS}-nox ${EMACS}-el + - sudo apt-get install -qq $emacs + # Install cask dependencies - curl -fsSLo /tmp/cask-master.zip https://github.com/cask/cask/archive/master.zip - sudo unzip -qq -d /opt /tmp/cask-master.zip - sudo ln -sf /opt/cask-master/bin/cask /usr/local/bin/cask - cask -env: -# - EMACS=emacs24 - - EMACS=emacs-snapshot + script: - emacs --version - make test \ No newline at end of file diff --git a/Makefile b/Makefile index e2855ae..8ec4b8e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -EMACS ?= emacs +emacs ?= emacs CASK ?= cask CASK_EXEC ?= ${CASK} exec EL_SOURCES = org-ref.el arxiv.el jmax-bibtex.el doi-utils.el isbn.el pubmed.el @@ -10,10 +10,10 @@ test: clean-elc ${MAKE} unit unit: - ${CASK_EXEC} ${EMACS} -Q -batch -l org-ref.el -l org-ref-test.el --eval "(ert t)" + ${CASK_EXEC} ${emacs} -Q -batch -l org-ref.el -l org-ref-test.el --eval "(ert t)" compile: - ${CASK_EXEC} ${EMACS} -Q -batch -f batch-byte-compile *.el + ${CASK_EXEC} ${emacs} -Q -batch -f batch-byte-compile *.el clean-elc: rm -f *.elc diff --git a/doi-utils.el b/doi-utils.el index 7873687..fa79d57 100644 --- a/doi-utils.el +++ b/doi-utils.el @@ -555,15 +555,16 @@ prompt. Otherwise, you have to type or pste in a DOI." ;; Wrap in save-window-excursion to restore your window arrangement after this ;; is done. (save-window-excursion - (find-file bibfile) - ;; Check if the doi already exists - (goto-char (point-min)) - (if (search-forward doi nil t) - (message "%s is already in this file" doi) - (end-of-buffer) - (insert "\n\n") - (doi-utils-insert-bibtex-entry-from-doi doi) - (save-buffer)))) + (with-current-buffer + (find-file-noselect bibfile) + ;; Check if the doi already exists + (goto-char (point-min)) + (if (search-forward doi nil t) + (message "%s is already in this file" doi) + (end-of-buffer) + (insert "\n\n") + (doi-utils-insert-bibtex-entry-from-doi doi) + (save-buffer))))) ;; * Updating bibtex entries diff --git a/sci-id.el b/sci-id.el index 7f4b880..e29388c 100644 --- a/sci-id.el +++ b/sci-id.el @@ -59,7 +59,7 @@ (lambda (keyword desc format) (cond ((eq format 'latex) - (format "\\href{http://www.scopus.com/authid/detail.url\\?origin=AuthorProfile&authorId=%s}{%s}" keyword keyword)) + (format "\\href{http://www.scopus.com/authid/detail.url\\?origin=AuthorProfile&authorId=%s}{%s}" keyword desc)) ((eq format 'html) (format "scopusid:%s" keyword keyword)))))