]> git.donarmstrong.com Git - org-ref.git/commitdiff
Revert "remove an apparent duplicate label finder."
authorJohn Kitchin <jkitchin@andrew.cmu.edu>
Sun, 15 Mar 2015 23:10:14 +0000 (19:10 -0400)
committerJohn Kitchin <jkitchin@andrew.cmu.edu>
Sun, 15 Mar 2015 23:10:14 +0000 (19:10 -0400)
This reverts commit 23bd30bb43dddb264021b31e7c23d1fac70fb097.

i thing it was not duplicate after all.

org-ref.el

index 8495d42be827fb40498b2fd157a54a5457b1dad7..1433b2f207a865df045e133fdba8ead9339959e0 100644 (file)
@@ -975,10 +975,8 @@ ARG does nothing."
        :type "custom_id"
        :link (format "[[#%s]]" (org-entry-get (point) "CUSTOM_ID"))))
 
-    ;; and to #+label: lines. In a table these are retrieved by :name
-    ;; properties.
-    (when (and (-contains? '(paragraph table src-block)
-                          (org-element-type object))
+    ;; and to #+label: lines
+    (when (and (equal (org-element-type object) 'paragraph)
               (org-element-property :name object))
       (org-store-link-props
        :type "ref"
@@ -1655,8 +1653,8 @@ Prompt for NEW-FILE includes bib files in `org-ref-default-bibliography', and bi
   (interactive)
   (doi-utils-crossref (org-ref-get-doi-at-point)))
 
-;; *** DEPRECATED Minibuffer menu
-;; See [[Helm bibtex setup]]
+;; *** Minibuffer menu
+
 (defun org-ref-cite-onclick-minibuffer-menu (&optional link-string)
   "Action when a cite link is clicked on.
 Provides a menu of context sensitive actions.  If the bibtex entry
@@ -2449,6 +2447,11 @@ Makes a new buffer with clickable links."
                         labels) 1)
          ;; this is a multiply defined label.
          (let ((cp (point)))
+           (goto-char (point-min))
+           (while (re-search-forward
+                   (format  "[^#+]label:%s\\s-" label) nil t)
+             (push (cons label (point-marker)) multiple-labels))
+
            (goto-char (point-min))
            (while (re-search-forward
                    (format  "\\label{%s}\\s-?" label) nil t)