Merge branch 'maint'

This commit is contained in:
Kyle Meyer 2021-03-19 00:40:26 -04:00
commit 17e27ea634
1 changed files with 8 additions and 5 deletions

View File

@ -14,7 +14,10 @@
;; Maintainer: stardiviner [numbchild@gmail.com]
;;; Code:
(require 'ob)
(require 'org-element)
;; Org-mode Babel
(defun org-babel-execute:smiles (body params)
"Execute SMILES babel `BODY' with `PARAMS'."
@ -25,7 +28,7 @@
(defun molecule-jump (name)
"Jump to molecule `NAME' definition."
(org-mark-ring-push)
(org-link-open-from-string (format "[[%s]]" path)))
(org-link-open-from-string (format "[[%s]]" name)))
(defun molecule-export (path desc backend)
"Export molecule to HTML format on `PATH' with `DESC' and `BACKEND'."
@ -36,10 +39,10 @@
((eq 'html backend)
(format "<a href=\"#%s\">%s</a>" name name)))))
(org-add-link-type
(org-link-set-parameters
"molecule"
'molecule-jump
'molecule-export)
:follow 'molecule-jump
:export 'molecule-export)
;; org-mode element
(org-element-map (org-element-parse-buffer)