* Flymake for elisp does not respect `load-path`
@ 2021-05-15 11:50 Max Brieiev
2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Max Brieiev @ 2021-05-15 11:50 UTC (permalink / raw)
To: help-gnu-emacs
In elisp buffer, flymake reports an error for the following line:
(require 'dash)
The reported error is "Cannot open load file: No such file or directory,
dash".
dash is obviously on `load-path`. How can I make flymake happy?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 11:50 Flymake for elisp does not respect `load-path` Max Brieiev
@ 2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-15 21:01 ` Max Brieiev
2021-05-15 19:31 ` Joost Kremers
2021-05-15 23:20 ` Philip Kaludercic
2 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2021-05-15 15:43 UTC (permalink / raw)
To: help-gnu-emacs
Max Brieiev [2021-05-15 14:50:50] wrote:
> In elisp buffer, flymake reports an error for the following line:
>
> (require 'dash)
>
> The reported error is "Cannot open load file: No such file or directory,
> dash".
>
> dash is obviously on `load-path`. How can I make flymake happy?
Flymake runs the byte-compiler is another Emacs session, so what you see
is a result of an interaction between the way flymake starts this other
Emacs and the way you set the `load-path` in your Emacs's configuration.
To see if it should be considered "your fault" or "flymake's fault",
we'd need more details about your config. I suggest you file a bug
report for that (even if it's "your fault", maybe we could improve the
diagnostics or the documentation to make it easier to track down).
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 11:50 Flymake for elisp does not respect `load-path` Max Brieiev
2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-05-15 19:31 ` Joost Kremers
2021-05-15 19:38 ` Joost Kremers
2021-05-15 21:26 ` Max Brieiev
2021-05-15 23:20 ` Philip Kaludercic
2 siblings, 2 replies; 8+ messages in thread
From: Joost Kremers @ 2021-05-15 19:31 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, May 15 2021, Max Brieiev wrote:
> In elisp buffer, flymake reports an error for the following line:
>
> (require 'dash)
>
> The reported error is "Cannot open load file: No such file or directory,
> dash".
>
> dash is obviously on `load-path`. How can I make flymake happy?
Set `elisp-flymake-byte-compile-load-path`, perhaps? I know that for flymake,
you need to set `flycheck-emacs-lisp-load-path` for this to work.
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 19:31 ` Joost Kremers
@ 2021-05-15 19:38 ` Joost Kremers
2021-05-15 21:26 ` Max Brieiev
1 sibling, 0 replies; 8+ messages in thread
From: Joost Kremers @ 2021-05-15 19:38 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, May 15 2021, Joost Kremers wrote:
> Set `elisp-flymake-byte-compile-load-path`, perhaps? I know that for flymake,
for flycheck, of course..
> you need to set `flycheck-emacs-lisp-load-path` for this to work.
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2021-05-15 21:01 ` Max Brieiev
0 siblings, 0 replies; 8+ messages in thread
From: Max Brieiev @ 2021-05-15 21:01 UTC (permalink / raw)
To: help-gnu-emacs
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> I suggest you file a bug report for that
Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48452
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 19:31 ` Joost Kremers
2021-05-15 19:38 ` Joost Kremers
@ 2021-05-15 21:26 ` Max Brieiev
2021-05-15 21:39 ` Joost Kremers
1 sibling, 1 reply; 8+ messages in thread
From: Max Brieiev @ 2021-05-15 21:26 UTC (permalink / raw)
To: help-gnu-emacs
Joost Kremers <joostkremers@fastmail.fm> writes:
> Set `elisp-flymake-byte-compile-load-path`, perhaps?
Cool, this helped. Thank you!
Does it have any drawbacks setting this in .emacs:
(setq elisp-flymake-byte-compile-load-path load-path)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 21:26 ` Max Brieiev
@ 2021-05-15 21:39 ` Joost Kremers
0 siblings, 0 replies; 8+ messages in thread
From: Joost Kremers @ 2021-05-15 21:39 UTC (permalink / raw)
To: help-gnu-emacs
On Sun, May 16 2021, Max Brieiev wrote:
> Joost Kremers <joostkremers@fastmail.fm> writes:
>
>> Set `elisp-flymake-byte-compile-load-path`, perhaps?
>
> Cool, this helped. Thank you!
>
> Does it have any drawbacks setting this in .emacs:
>
> (setq elisp-flymake-byte-compile-load-path load-path)
It's probably safe to set it (don't see any reason why not), but you should
probably check the manual to make sure that when you set
`elisp-flymake-byte-compile-load-path`, the `load-path` contains all necessary
directories.. See:
(info "(elisp) Library Search")
--
Joost Kremers
Life has its moments
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Flymake for elisp does not respect `load-path`
2021-05-15 11:50 Flymake for elisp does not respect `load-path` Max Brieiev
2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-15 19:31 ` Joost Kremers
@ 2021-05-15 23:20 ` Philip Kaludercic
2 siblings, 0 replies; 8+ messages in thread
From: Philip Kaludercic @ 2021-05-15 23:20 UTC (permalink / raw)
To: help-gnu-emacs
Max Brieiev <max.brieiev@gmail.com> writes:
> In elisp buffer, flymake reports an error for the following line:
>
> (require 'dash)
>
> The reported error is "Cannot open load file: No such file or directory,
> dash".
>
> dash is obviously on `load-path`. How can I make flymake happy?
Have you tried wrapping the require statement in a (eval-and-load ...)
block? I had the same issue with loading site-local files in my
configuration.
--
Philip K.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-05-15 23:20 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-15 11:50 Flymake for elisp does not respect `load-path` Max Brieiev
2021-05-15 15:43 ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-05-15 21:01 ` Max Brieiev
2021-05-15 19:31 ` Joost Kremers
2021-05-15 19:38 ` Joost Kremers
2021-05-15 21:26 ` Max Brieiev
2021-05-15 21:39 ` Joost Kremers
2021-05-15 23:20 ` Philip Kaludercic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).