[hydra] create hydra to evaluate Org shell source blocks

This commit is contained in:
contrapunctus 2021-09-21 13:47:13 +05:30
parent b2055090d2
commit 35f8b1bc05
1 changed files with 13 additions and 0 deletions

View File

@ -1814,6 +1814,8 @@ Don't try to check if there are files with a certain extension...it will lead to
(my-prolog-hydra/body))
((derived-mode-p 'org-mode)
(my-org-hydra/body))
((derived-mode-p 'sh-mode)
(my-shell-hydra/body))
(t (contrapunctus-general-hydra/body))))
(define-key boon-command-map (kbd "m") #'my-dispatch-hydra)
@ -1821,6 +1823,17 @@ Don't try to check if there are files with a certain extension...it will lead to
(define-key boon-command-map (kbd "C-s") #'my-dispatch-hydra)
#+END_SRC
*** shell
#+BEGIN_SRC emacs-lisp
(my-defhydra my-shell-hydra (:color blue)
"Shell"
("e" my-shell-eval-hydra/body "eval"))
(defhydra my-shell-eval-hydra (:color blue)
"Evaluate"
("b" org-babel-execute-src-block "source block"))
#+END_SRC
** eshell
#+BEGIN_SRC emacs-lisp
(use-package eshell