[hydra] move compile out of common heads; rename cp/compile-project

This commit is contained in:
contrapunctus 2021-08-03 15:11:25 +05:30
parent ffff738225
commit edbedbf907
1 changed files with 6 additions and 4 deletions

View File

@ -1368,7 +1368,6 @@ Add these common operations to the hydra -
("3" split-window-right "split right" :color red)
("a" my-app-hydra/body "applications")
("z" my-app-hydra/body "applications")
("b" compile "compile")
("C" contrapunctus-mc-hydra/body "multiple cursors")
("d" dired-jump "dired-jump")
("D" (cp-insert-timestamp t) "date")
@ -1474,6 +1473,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
#+BEGIN_SRC emacs-lisp
(my-defhydra contrapunctus-general-hydra (:color blue)
"What command?"
("b" compile "compile")
("E" toggle-debug-on-error "tdoe")
("Q" toggle-debug-on-quit "tdoq"))
#+END_SRC
@ -1514,6 +1514,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
("t" my-org-hydra-set-tags "tags")
("C-t" org-todo "todo" :color red)
("n" my-org-hydra-nav/body "navigation")
("b" compile "compile")
("C-b" contrapunctus-async-tangle "babel-tangle")
("E" toggle-debug-on-error "tdoe")
@ -1567,6 +1568,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
(my-defhydra my-elisp-hydra (:color blue)
"Emacs Lisp"
("c" my-elisp-bytecomp-hydra/body "byte compile")
("b" compile "compile")
("C-b" contrapunctus-async-tangle "babel-tangle")
("e" my-elisp-hydra-eval/body "Eval")
("E" my-elisp-hydra-debug/body "Debug")
@ -1585,7 +1587,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
**** unit testing
#+BEGIN_SRC emacs-lisp
(defhydra contrapunctus-el-test (:color blue)
("e" (cp/compile-project "Cask" "cask exec buttercup -L . --traceback pretty") "buttercup")
("e" (my-compile-project "Cask" "cask exec buttercup -L . --traceback pretty") "buttercup")
("r" ert "ert"))
#+END_SRC
**** debug
@ -1661,7 +1663,7 @@ _u_: next word ^_l_: edit lines^ _s_: next whole symbol
#+BEGIN_SRC emacs-lisp
(my-defhydra my-lilypond-hydra (:color blue)
"Lilypond"
("b" (cp/compile-project "main.ly" "./mkly dev") "Compile")
("b" (my-compile-project "main.ly" "./mkly dev") "Compile")
("E" toggle-debug-on-error "tdoe")
("Q" toggle-debug-on-quit "tdoq"))
#+END_SRC
@ -2831,7 +2833,7 @@ pjb suggested a different approach [[http://paste.lisp.org/display/10157][here]]
#+END_SRC
#+BEGIN_SRC emacs-lisp
(defun cp/compile-project (file cmd)
(defun my-compile-project (file cmd)
"Locate directory with FILE and run compile command CMD."
(cd (locate-dominating-file default-directory file))
(compile cmd))