doc(dev how-to): explain running after tangling end

This commit is contained in:
contrapunctus 2021-06-03 17:40:59 +05:30
parent 919c344003
commit 2d26aa3fa6
1 changed files with 10 additions and 2 deletions

View File

@ -287,17 +287,25 @@ Further details are stored in properties -
" ")))))))))
#+END_SRC
3. If you use Magit, you can run =makem.sh= after staging the files -
3. Set up compiling, linting, and testing with =makem.sh=. First, define this command -
#+BEGIN_SRC emacs-lisp
#+BEGIN_SRC emacs-lisp :tangle no :load no
(defun run-makem ()
(interactive)
(cd (locate-dominating-file default-directory "makem.sh"))
(compile "./makem.sh compile lint test-ert"))
#+END_SRC
Then, run it after staging the files -
#+BEGIN_SRC emacs-lisp :tangle no :load no
(add-hook 'magit-post-stage-hook #'run-makem)
#+END_SRC
Or after tangling ends -
#+BEGIN_SRC emacs-lisp :tangle no :load no
(add-hook 'org-babel-post-tangle-hook #'run-makem)
#+END_SRC
** How to tangle this file
Use =org-babel= (=org-babel-tangle= / =org-babel-tangle-file=), /not/ =literate-elisp-tangle=. The file emitted by the latter does not contain comments - thus, it does not contain library headers or abide by =checkdoc='s comment conventions.