X-Git-Url: https://git.donarmstrong.com/?p=org-ref.git;a=blobdiff_plain;f=org-ref.org;h=f9bc3adb7f23e64267f0ff9902e57b3f0da6d258;hp=e0c321698a9e8fef054d6a5ea4ad07f2fa88d2ec;hb=39af3a30dbdc56a75ba17838cdd08d56ae2accf1;hpb=df65a98ea7c2c73e802724707ea3f3b063619de7 diff --git a/org-ref.org b/org-ref.org index e0c3216..f9bc3ad 100644 --- a/org-ref.org +++ b/org-ref.org @@ -1,3 +1,4 @@ +# -*- org-edit-src-content-indentation: 0; -*- #+TITLE: Org-ref - The best reference handling for org-mode #+AUTHOR: John Kitchin #+DATE: April 29, 2014 @@ -3226,7 +3227,17 @@ Sometimes it may be helpful to manually change the order of citations. These fun (org-ref-swap-keys i (- i 1) keys)) (setq keys (mapconcat 'identity keys ",")) ;; and replace the link with the sorted keys - (cl--set-buffer-substring begin end (concat type ":" keys " ")) + (cl--set-buffer-substring + begin end + (concat + type ":" keys + ;; It seems the space at the end can get consumed, so we see if there + ;; is a space, and add it if so. Sometimes there is a comma or period, + ;; then we do not want a space. + (when + (save-excursion + (goto-char end) + (looking-back " ")) " "))) ;; now go forward to key so we can move with the key (re-search-forward key) (goto-char (match-beginning 0))))) @@ -3781,7 +3792,7 @@ This is a list of cons cells '((\"description\" . action)). The action function '("Example" . (lambda () (message-box "You did it!"))) t) -;;;###qautoload +;;;###autoload (defun org-ref-cite-click-helm (key) "Open helm for actions on a cite link. subtle points.