Files
emacs.d/elpa/org-ref-20180608.1130/nist-webbook.el
Mateus Pinto Rodrigues f6ec2ebf59 Update packages/ Add org-ref
2018-06-11 13:50:46 -03:00

43 lines
1.0 KiB
EmacsLisp

;;; nist-webbook.el --- Integration of Emacs with NIST Webbook
;; Integration of Emacs with NIST webbook
;;; Commentary:
;; nist-webbook-name :: search for a chemical name
;; nist-webbook-formula :: search by chemical formula
;;; Code:
(require 'org)
(require 'org-ref-utils)
;;;###autoload
(defun nist-webbook-formula (formula)
"Search NIST webbook for FORMULA."
(interactive "sFormula: ")
(browse-url
(concat
"http://webbook.nist.gov/cgi/cbook.cgi?Formula="
formula
"&NoIon=on&Units=SI")))
;;;###autoload
(defun nist-webbook-name (name)
"Search NIST webbook for NAME."
(interactive "sChemical Name: ")
(browse-url
(concat "http://webbook.nist.gov/cgi/cbook.cgi?Name="
(url-hexify-string name)
"&Units=SI")))
(org-ref-link-set-parameters "nist-wb-name"
:follow (lambda (name)
(nist-webbook-name name)))
(org-ref-link-set-parameters "nist-wb-formula"
:follow (lambda (formula)
(nist-webbook-formula formula)))
(provide 'nist-webbook)
;;; nist-webbook.el ends here