GNU bug report logs -
#48452
28.0.50; flymake for elisp does not respect `load-path`
Previous Next
Full log
Message #22 received at 48452 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Do you have a complete step by step recipe that demonstrates the
> problem? I tried the original instructions, but got no messages from
> flymake (except complaining that the .emacs file doesn't start with ;;;
> Commentary).
`elisp-flymake-byte-compile' is a flymake backend for the elisp-mode.
It runs emacs in batch mode with -Q flag as a child process to provide
diagnostics for the current buffer.
In this case the `load-path' of the child process includes only builtin
packages, while the `load-path' of the parent process includes all the
directories added by the normal bootstrap process.
The load-path for the child process is controlled with
`elisp-flymake-byte-compile-load-path'. By default, it contains only
current directory.
The following hack "fixed" the issue for me:
[elisp-mode.el.diff (text/x-patch, inline)]
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 0c4a9bfdbe..db3592b903 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -2145,7 +2145,7 @@ current buffer state and calls REPORT-FN when done."
"--batch"
;; "--eval" "(setq load-prefer-newer t)" ; for testing
,@(mapcan (lambda (path) (list "-L" path))
- elisp-flymake-byte-compile-load-path)
+ load-path)
"-f" "elisp-flymake--batch-compile-for-flymake"
,temp-file)
:connection-type 'pipe
[Message part 3 (text/plain, inline)]
Can we add some user-friendly knobs to control this behavior of flymake?
This bug report was last modified 2 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.