GNU bug report logs -
#31981
26.1; flymake: removes temporary file before finishing check
Previous Next
Reported by: Enrico Scholz <enrico.scholz <at> sigma-chemnitz.de>
Date: Tue, 26 Jun 2018 17:28:01 UTC
Severity: normal
Tags: fixed
Found in version 26.1
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 31981 <at> debbugs.gnu.org (full text, mbox):
Joel Rosdahl <joel <at> rosdahl.net> writes:
> On Wed, 28 Aug 2019 at 01:38, Noam Postavsky <npostavs <at> gmail.com> wrote:
>> If I'm reading flymake-proc-init-create-temp-buffer-copy correctly, it
>> actually makes a new temporary file (say T1), but the file name is stored in
>> a single variable, so Emacs effectively forgets about the original file T.
>
> The create-temp-f parameter to flymake-proc-init-create-temp-buffer-copy is in
> practice flymake-proc-create-temp-inplace, which always creates the same result
> for a given file-name and prefix. And file-name and prefix are the same for
> both modification A and B (since it's the same file). Or am I missing
> something?
No, it's just me who missed this. There's a lot of indirection, and I
didn't read that carefully.
> but I just learnt to my surprise that global defvar-ed
> variables are still dynamically scoped.
Well, they would be unusable otherwise, since global vars don't have any
lexical scope as such.
> + ;; Make cleanup-f see the temporary file names
> + ;; created by its corresponding init function
> + ;; (bug#31981).
> + (let ((flymake-proc--temp-source-file-name
> + (process-get proc 'flymake-proc--temp-source-file-name))
> + (flymake-proc--temp-master-file-name
> + (process-get proc 'flymake-proc--temp-master-file-name)))
> + (funcall cleanup-f)))))
A little awkward, but that's proably the best we can do without changing
the signature of cleanup-f (which I guess would be much more
troublesome).
This bug report was last modified 5 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.