+(defun org-ref-copy-entry-as-summary ()
+ "Copy the bibtex entry for the citation at point as a summary."
+ (interactive)
+ (save-window-excursion
+ (org-ref-open-citation-at-point)
+ (kill-new (org-ref-bib-citation))))
+
+
+(defun org-ref-copy-entry-at-point-to-file ()
+ "Copy the bibtex entry for the citation at point to NEW-FILE.
+Prompt for NEW-FILE includes bib files in org-ref-default-bibliography, and bib files in current working directory. You can also specify a new file."
+ (interactive)
+ (let ((new-file (ido-completing-read
+ "Copy to bibfile: "
+ (append org-ref-default-bibliography
+ (f-entries "." (lambda (f) (f-ext? f "bib"))))))
+ (key (org-ref-get-bibtex-key-under-cursor)))
+ (save-window-excursion
+ (org-ref-open-citation-at-point)
+ (bibtex-copy-entry-as-kill))
+
+ (let ((bibtex-files (list (file-truename new-file))))
+ (if (assoc key (bibtex-global-key-alist))
+ (message "That key already exists in %s" new-file)
+ ;; add to file
+ (save-window-excursion
+ (find-file new-file)
+ (goto-char (point-max))
+ ;; make sure we are at the beginning of a line.
+ (unless (looking-at "^") (insert "\n\n"))
+ (bibtex-yank)
+ (save-buffer))))))
+
+