I've started to write a package and excessive use of the interactive
eval-* functions has become a pain point for me.
After I make a change re-evaluating entire file or package is almost always appropriate.
eval-buffer is usually sufficient and usually what I run.
Since I'm an emacser with the C-x C-s Tourette-esque tic eval'ing the buffer would be something I'd like to happen automatically on save. I'm writing elisp, but I can imagine other circumstances where the same workflow would be useful. Eval'ing the entire project (i.e.
(require 'my-package)) would often also be sufficient in cases that the package is in
I've started to use .dir-locals.el files in these projects which add a buffer-local
((emacs-lisp-mode (eval add-hook 'before-save-hook 'eval-buffer nil t)))
What would be a better way to accommodate this sort of workflow / What other ways have people implemented this workflow?
I'm wishing there's something in the realm of zero-configuration "Do what I mean" to figure out / track which projects/directories/files I want eval'd on save and do it. I happen to use projectile, but am still curious about broader possibilities which may or may not be usable with projectile.
A few thoughts:
- global hook conditioned on a file ("Cask"?) existing in the project root