+ (setq reftex-cite-format 'org))
+
+;; define key for inserting citations
+(define-key org-mode-map
+ (kbd org-ref-insert-cite-key)
+ org-ref-insert-cite-function)
+
+(when org-ref-show-citation-on-enter
+ (setq org-ref-message-timer
+ (run-with-idle-timer 0.5 t 'org-ref-link-message)))
+
+(defun org-ref-show-link-messages ()
+ "Turn on link messages. You will see a message in the
+minibuffer when on a cite, ref or label link."
+ (interactive)
+ (setq org-ref-message-timer
+ (run-with-idle-timer 0.5 t 'org-ref-link-message))
+ )
+(defun org-ref-cancel-link-messages ()
+ "Stop showing messages in minibuffer when on a link."
+ (interactive)
+ (cancel-timer org-ref-message-timer))
+
+;; this approach caused the selected region to not be highlighted any more.
+; (add-hook 'post-command-hook 'org-ref-link-message))
+; (remove-hook 'post-command-hook 'org-ref-link-message))