]> git.donarmstrong.com Git - org-ref.git/commitdiff
Merge branch 'journaltitle' of https://github.com/brabalan/org-ref into brabalan...
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Thu, 23 Apr 2015 13:59:51 +0000 (09:59 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Thu, 23 Apr 2015 13:59:51 +0000 (09:59 -0400)
.travis.yml
Makefile
doi-utils.el
sci-id.el

index 1f94d838a6e61e57e343174e54ea3f548d870078..d51906fdee80d1b79fc9fbc006baef4536b23305 100644 (file)
@@ -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
index e2855ae7fdf5af6e3e5284cef59c1a27e7d39c22..8ec4b8e7428a154c5111c017f947d9ec769f26a5 100644 (file)
--- 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
index 78736871a7c4852c4bd24e5e82ddae9282b86040..fa79d577f7e7db972ed98d4cc70e2c8477ec029f 100644 (file)
@@ -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
index 7f4b880cc7f2a5f43d5e6922889a5375e8c6fde6..e29388c2b382cef037a230a3057b487be103530f 100644 (file)
--- 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 "<a href=\"http://www.scopus.com/authid/detail.url?origin=AuthorProfile&authorId=%s\">scopusid:%s</a>" keyword keyword)))))