- (action . (lambda (candidate)
- candidate )))))
- (setq doi
- (helm :sources '(source)))
-
- (when doi
- (bibtex-make-field "doi")
- (backward-char)
- ;; crossref returns doi url, but I prefer only a doi for the doi field
- (insert (replace-regexp-in-string "^http://dx.doi.org/" "" doi))))))
+ (action . (("Insert doi and url field" . (lambda (doi)
+ (bibtex-make-field "doi")
+ (backward-char)
+ ;; crossref returns doi url, but I prefer only a doi for the doi field
+ (insert (replace-regexp-in-string "^http://dx.doi.org/" "" doi))
+ (when (string= ""(reftex-get-bib-field "url" entry))
+ (bibtex-make-field "url")
+ (backward-char)
+ (insert doi))))
+ ("Open url" . (lambda (doi)
+ (browse-url doi))))))))
+ (helm :sources '(source)))))