GNU bug report logs - #48452
28.0.50; flymake for elisp does not respect `load-path`

Previous Next

Package: emacs;

Reported by: Max Brieiev <max.brieiev <at> gmail.com>

Date: Sat, 15 May 2021 20:47:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: Max Brieiev <max.brieiev <at> gmail.com>, 48452 <at> debbugs.gnu.org
Subject: bug#48452: 28.0.50; flymake for elisp does not respect `load-path`
Date: Sat, 16 Jul 2022 12:12:40 +0200
João Távora <joaotavora <at> gmail.com> writes:

> When I was first coding this backend, I had that expectation too.
> But it's not very useful, as you normally, when developing an elisp
> file in a package, you want to be made aware of the potential compilation
> problems arising when compiling that file in a much simpler environment,
> very often the Emacs -Q environment where Makefiles usually byte-compile 
> files.

That's a good point.

> And there's also the question of security.  Flymake runs compile-time 
> code every time by simply modifying the buffer.  So being conservative
> here is also a good idea because of that.

Speaking of which, I was surprised that flymake adds "./" to the load
path -- we never use that in real Emacsen exactly because of security
considerations (we don't want to pick up stray files when working under
/tmp/, for instance).  

> Anyway, because the directories under ~/.emacs.d/elpa are somewhat special
> and/or security-vetted it _could_ make sense to add them to the default
> value of the variable. This would amount to more or less the same as 
> calling the underlying process with `-f package-initialize` I think.
>
> But I'm still not sure this should be the default, or merely an option to 
> the flymake-elisp-byte-compile backend.  I think the second is safer.

An option here would be nice, yes.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.