]> git.donarmstrong.com Git - org-ref.git/blobdiff - org-ref.org
switch alternative cite selection to helm
[org-ref.git] / org-ref.org
index e5a3c47bd2025ca0c8d36e87b8c5c0bc4b77c2cd..7f13af029ba26b9c2fa80fe4fbcb97499bacb40d 100644 (file)
@@ -2795,7 +2795,6 @@ Now, let us define a function that inserts the cite links:
   "Insert selected KEYS as cite link. Append KEYS if you are on a link.
 Technically, this function should return a string that is inserted by helm. This function does the insertion and gives helm an empty string to insert. This lets us handle appending to a link properly."
   (let* ((object (org-element-context)))
-  (message-box "prefix is %s" helm-current-prefix-arg)
     (cond
      ;; case where we are in a link
      ((and (equal (org-element-type object) 'link)
@@ -2823,12 +2822,15 @@ Technically, this function should return a string that is inserted by helm. This
      (t
       (insert
        (concat (if helm-current-prefix-arg
+                  (helm :sources `((name . "link types")
+                                   (candidates . ,org-ref-cite-types)
+                                   (action . (lambda (x) x))))
                   (ido-completing-read "Type: " org-ref-cite-types)
                org-ref-default-citation-link)
               ":"
               (s-join "," keys))))))
-;; return empty string for helm
-"")
+  ;; return empty string for helm
+  "")
 
 (setq helm-bibtex-format-citation-functions
       '((org-mode . helm-bibtex-format-org-ref)))