2

when running Flymake against ~/.emacs, I see errors complaining about missing files like "powerline" and "company" - i.e. stuff contained in load-path. How can I configure Flymake's elisp backend to be aware of load-path? Nothing in the Flymake customize-group looked applicable.

This is with Emacs 27.0.50 .

Dan O
  • 151
  • 7
  • This will not answer your question, but in case you were using Flycheck, this would be fixable by setting flycheck-emacs-lisp-load-path – Laurynas Biveinis Sep 25 '19 at 12:57

2 Answers2

0

There is elisp-flymake-byte-compile-load-path. Setting it to load-path last in your init file seems to be a quick-fix.

(setq elisp-flymake-byte-compile-load-path load-path)
0

An alternative to the answer provided by Anders Johansson—useful in case one is changing load-path after the init file has been loaded—is to add advice around elisp-flymake-byte-compile:

(defun my-elisp-flymake-byte-compile (old-function &rest arguments)
  ;; checkdoc-params: (old-function arguments)
  "Wrapper for `elisp-flymake-byte-compile'."
  (let ((elisp-flymake-byte-compile-load-path (append elisp-flymake-byte-compile-load-path load-path)))
    (apply old-function arguments)))

(advice-add 'elisp-flymake-byte-compile :around #'my-elisp-flymake-byte-compile)
d125q
  • 1,418
  • 5
  • 9