]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
wrap in save-excursion
[org-ref.git] / org-ref.org
index d4dc2a40f5f0169b1067a2e72e79af7983b52910..4276b0d48a61bb6e8927aa303c11ec101947f715 100644 (file)
@@ -2716,8 +2716,8 @@ ref:test citep:test  label:rett
   (interactive)
   (let* ((object (org-element-context))
         (type (org-element-property :type object)))
-
-    (cond
+    (save-excursion
+      (cond
      ;; cite links
      ((-contains? org-ref-cite-types type)
       (message (org-ref-get-citation-string-at-point)))
@@ -2727,6 +2727,10 @@ ref:test citep:test  label:rett
       (message (org-ref-get-label-context
                (org-element-property :path object))))
 
+     ((string= type "eqref")
+      (message (org-ref-get-label-context
+               (org-element-property :path object))))
+
      ;; message the count
      ((string= type "label")
       (let ((count (org-ref-count-labels
@@ -2737,7 +2741,7 @@ ref:test citep:test  label:rett
                  " occurence"
                  (when (or (= count 0)
                            (> count 1))
-                   "s"))))))))
+                   "s")))))))))
 
 
 (when org-ref-show-citation-on-enter
@@ -2879,12 +2883,12 @@ Checks for pdf and doi, and add appropriate functions."
     (when (string= doi "") (setq doi nil))
     (when (string= url "") (setq url nil))
 
+    ;; Conditional pdf functions
     (if (file-exists-p pdf-file)
        (add-to-list
         'candidates
         '("Open pdf" . org-ref-open-pdf-at-point)
-        t
-        )
+        t)
       (add-to-list
        'candidates
        '("Try to get pdf" . (lambda ()
@@ -2900,6 +2904,7 @@ Checks for pdf and doi, and add appropriate functions."
      '("Open notes" . org-ref-open-notes-at-point)
      t)
 
+    ;; conditional url and doi functions
     (when (or url doi)
       (add-to-list
        'candidates