#+END_SRC
-
* Utilities
** create simple text citation from bibtex entry
#+END_SRC
** Lightweight messages about links
-To get a lighter weight message about the label, ref and cite links, we define a function that gives us the minibuffer message, without the menu. We add it to a hook that updates after every command, including cursor movements.
+To get a lighter weight message about the label, ref and cite links, we define a function that gives us the minibuffer message, without the menu. We run this in an idle timer.
#+BEGIN_SRC emacs-lisp :tangle org-ref.el
(defun org-ref-get-label-context (label)
(-contains?
org-ref-cite-types
(org-element-property :type object)))
- (message-box "in a link")
+ ;;(message-box "in a link")
(goto-char (org-element-property :end object))
;; sometimes there are spaces at the end of the link
;; this code moves point pack until no spaces are there
(-contains?
org-ref-cite-types
(org-element-property :type (org-element-context)))))
- (message-box "at end of a link")
+ ;;(message-box "at end of a link")
;; (goto-char (org-element-property :end object))
(while (looking-back " ") (backward-char))
(insert (concat "," (mapconcat 'identity keys ","))))
;; insert fresh link
(t
- (message-box "fresh link")
+ ;;(message-box "fresh link")
(insert
(concat (if helm-current-prefix-arg
(helm :sources `((name . "link types")
(helm-bibtex)))
(require 'helm-bibtex)
+
+(mapc (lambda (x) (add-to-list 'helm-bibtex-fallback-options x t))
+ '(("Crossref" . "http://search.crossref.org/?q=%s")
+ ("Scopus" . "http://www.scopus.com/scopus/search/submit/xadvanced.url?searchfield=TITLE-ABS-KEY(%s)")
+ ("Open Web of Science" . (lambda () (browse-url "http://apps.webofknowledge.com")))))
#+END_SRC
** A helm click menu