Is it possible to insert additional field(s) in the result of doi-insert-bibtex? So for example right now (doi-insert-bibtex "10.1010....") produces:
@Article{article,
author = {author},
title = {Title},
abstract = {Abstract}
}
I want to insert the field "file", which is generated by my function from "title":
(defun add-fields ()
(interactive)
(let* ((title (bibtex-autokey-get-field "title" '(("[^ a-zA-Z0-9_-]" . "") ("mathrm" . ""))))
(len (length title))
(file (bibtex-text-in-field "file")))
(if (and title (not file))
(progn
(bibtex-make-field "file" t t )
(insert (concat "~/Science/Papers/" (substring title 0 (if (> len 100) 100 len )) ".pdf"))))))
Hi,
Is it possible to insert additional field(s) in the result of doi-insert-bibtex? So for example right now (doi-insert-bibtex "10.1010....") produces: @Article{article, author = {author}, title = {Title}, abstract = {Abstract} }
I want to insert the field "file", which is generated by my function from "title":
(defun add-fields () (interactive) (let* ((title (bibtex-autokey-get-field "title" '(("[^ a-zA-Z0-9_-]" . "") ("mathrm" . "")))) (len (length title)) (file (bibtex-text-in-field "file"))) (if (and title (not file)) (progn (bibtex-make-field "file" t t ) (insert (concat "~/Science/Papers/" (substring title 0 (if (> len 100) 100 len )) ".pdf"))))))
@Article{article, author = {author}, title = {Title}, abstract = {Abstract}, file={~/Science/Papers/Title.pdf} }
So, can the doi-insert-bibtex produce such entry?