1
votes

I'm looking to automate my development and I would like emacs to execute a few commands automatically when I load any file called "project.clj"

Specifically I'd like it to check the open buffers, and if there isn't a buffer called "swank" execute the clojure-jack-in command as if it came from the "project.clj" buffer,

and then I'd like it to run shell and speedbar as well, but I imagine once I figure out how to do the above, those will be easy.

I am a complete elisp noob, but I'm familiar with lisp in general.

1

1 Answers

4
votes

You could do something like this:

(defun my-project-hook (filename)
  (when (string= (file-name-nondirectory filename) "project.clj")
    (do-stuff)))

(add-hook 'after-load-functions 'my-project-hook)