]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
make custom-id links have a message.
[org-ref.git] / org-ref.org
index 2e9647faa72b444252106c9a9bab6c2b33ff8db2..05828740cf76a05a5d81c8d8476965f5fe01bb47 100644 (file)
@@ -3069,13 +3069,6 @@ To get a lighter weight message about the label, ref and cite links, we define a
                        (progn
                          (forward-line 4)
                          (point)))))
-
-      ;; maybe we have a CUSTOM-ID
-      (org-map-entries
-       (lambda () (when (string=
-                        label
-                        (org-entry-get (point) "CUSTOM_ID"))
-                   (throw 'result (org-get-heading)))))
       (beep)
       (throw 'result "!!! NO CONTEXT FOUND !!!"))))
 
@@ -3114,6 +3107,12 @@ To get a lighter weight message about the label, ref and cite links, we define a
                                (> count 1))
                        "s")))))
 
+        ((string= type "custom-id")
+         (save-excursion
+           (org-open-link-from-string
+            (format "[[#%s]]" (org-element-property :path object)))
+           (message "%s" (org-get-heading))))
+
          ;; check if the bibliography files exist.
         ((string= type "bibliography")
          (let* ((bibfile)