[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13924: 24.2; Recompile and compile-environment
From: |
Lars Ingebrigtsen |
Subject: |
bug#13924: 24.2; Recompile and compile-environment |
Date: |
Wed, 14 Aug 2019 23:09:16 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
lars@nocrew.org writes:
> This lisp code starts a compilation with the provided environment:
>
> (let ((compilation-environment '("FOO=BAR")))
> (compile "printenv"))
>
> Typing 'g' or 'M-x recompile' in the *compilation* buffer starts
> another compilation with the same environment. This is evident since
> the printenv output includes FOO=BAR.
>
> However, typing 'M-x recompile' in some other buffer will not use the same
> environment as the first compilation. FOO=BAR is no longer present.
>
> This behaviour may be a bug or a feature. However, in my opinion it
> renders the combination of 'compilation-environment' and 'recompile'
> somewhat useless.
I think this behaviour is probably as intended. As the doc string to
`recompile' says:
--
If this is run in a Compilation mode buffer, re-use the arguments from the
original use. Otherwise, recompile using ‘compile-command’.
--
I think that implies that the `compilation-environment' isn't reused,
either.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#13924: 24.2; Recompile and compile-environment,
Lars Ingebrigtsen <=