<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>It works!</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>thanks</span></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font
size="2" face="Arial"> On Thursday, January 16, 2014 5:33 PM, Magnus Henoch <magnus@erlang-solutions.com> wrote:<br> </font> </div> <div class="y_msg_container">Dror Mein <<a shape="rect" ymailto="mailto:drormein@yahoo.com" href="mailto:drormein@yahoo.com">drormein@yahoo.com</a>> writes:<div class="yqt3458223909" id="yqtfd21434"><br clear="none"><br clear="none">> not completely an erlang question:<br clear="none">><br clear="none">> I've tried to hack my code with the elisp from here:<br clear="none">><br clear="none">> <a shape="rect" href="http://blog.erlware.org/2012/05/15/getting-flymake-and-rebar-to-play-nice/" target="_blank">http://blog.erlware.org/2012/05/15/getting-flymake-and-rebar-to-play-nice/</a></div><br clear="none"><br clear="none">I used that code earlier, and was mostly happy with it but found it<br clear="none">somewhat slow. (Also, it gets into an infinite loop on OSX. You need<br
clear="none">to add "Volumes" to the list of directories not to recurse into,<br clear="none">alongside "." and "..".) Now I'm using the following piece of elisp,<br clear="none">which completely ignores the Rebar configuration but gets it right for<br clear="none">most projects I work with:<br clear="none"><br clear="none">(defun mh-simple-get-deps-code-path-dirs ()<br clear="none"> ;; Why complicate things?<br clear="none"> (and (buffer-file-name)<br clear="none"> (let ((default-directory (file-name-directory (buffer-file-name))))<br clear="none"> (file-expand-wildcards "../../*/ebin"))))<br clear="none"><br clear="none">(defun mh-simple-get-deps-include-dirs ()<br clear="none"> (list "../include"))<br clear="none"><br clear="none">(setq erlang-flymake-get-code-path-dirs-function 'mh-simple-get-deps-code-path-dirs<br clear="none">
erlang-flymake-get-include-dirs-function 'mh-simple-get-deps-include-dirs)<br clear="none"><br clear="none">Also at:<br clear="none"><a shape="rect" href="https://github.com/legoscia/dotemacs/blob/master/dotemacs.org#try-harder-to-find-include-files-in-flymake" target="_blank">https://github.com/legoscia/dotemacs/blob/master/dotemacs.org#try-harder-to-find-include-files-in-flymake</a><br clear="none"><br clear="none">Regards,<br clear="none">Magnus<div class="yqt3458223909" id="yqtfd74616"><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>