[erlang-questions] flymake include dir

Magnus Henoch magnus@REDACTED
Thu Jan 16 16:31:43 CET 2014

Dror Mein <drormein@REDACTED> writes:

> not completely an erlang question:
> I've tried to hack my code with the elisp from here:
> http://blog.erlware.org/2012/05/15/getting-flymake-and-rebar-to-play-nice/

I used that code earlier, and was mostly happy with it but found it
somewhat slow.  (Also, it gets into an infinite loop on OSX.  You need
to add "Volumes" to the list of directories not to recurse into,
alongside "." and "..".)  Now I'm using the following piece of elisp,
which completely ignores the Rebar configuration but gets it right for
most projects I work with:

(defun mh-simple-get-deps-code-path-dirs ()
  ;; Why complicate things?
  (and (buffer-file-name)
       (let ((default-directory (file-name-directory (buffer-file-name))))
         (file-expand-wildcards "../../*/ebin"))))

(defun mh-simple-get-deps-include-dirs ()
  (list "../include"))

(setq erlang-flymake-get-code-path-dirs-function 'mh-simple-get-deps-code-path-dirs
      erlang-flymake-get-include-dirs-function 'mh-simple-get-deps-include-dirs)

Also at:


More information about the erlang-questions mailing list