From: John Kitchin Date: Sat, 31 Jan 2015 14:20:22 +0000 (-0500) Subject: polishing add function X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=commitdiff_plain;h=076d9bffd0ed994a5a7452799f72ea8ce8553537 polishing add function --- diff --git a/doi-utils.org b/doi-utils.org index 1b08ee8..65ebe06 100644 --- a/doi-utils.org +++ b/doi-utils.org @@ -567,7 +567,7 @@ prompt. Otherwise, you have to type or pste in a DOI." (cond ;; If region is active and it starts like a doi we want it. ((and (region-active-p) - ((s-match "^10" (buffer-susbstring + (s-match "^10" (buffer-substring (region-beginning) (region-end)))) (buffer-susbstring (region-beginning) (region-end))) @@ -578,7 +578,7 @@ prompt. Otherwise, you have to type or pste in a DOI." ;; otherwise, we have no initial input. You ;; will have to type it in. (t - nil)))) + nil))) ;; now get the bibfile to add it to (ido-completing-read "Bibfile: "