diff --git a/lisp/mitch-packages.el b/lisp/mitch-packages.el index 191e3d3..326890e 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mitch-packages.el @@ -59,8 +59,21 @@ :after org :config (require 'edraw-org) - (edraw-org-setup-default)) + (edraw-org-setup-default) + ;; following function taken from https://github.com/wn/doom.d/blob/46ca46f2ef21e933fb76b1568be1a62b262ed288/config.el#L47 + (defun org-mode-open-edraw (&optional filename) + (interactive) + (let ((filename (or filename + (concat "./" + (file-relative-name + (read-file-name (edraw-msg "Write svg file: ") + default-directory) + default-directory))))) + (insert (format "[[edraw:file=%s]]" filename)) + (backward-char) + (org-return)))) + ;; diminish (use-package diminish)