GNU bug report logs -
#55056
[PATCH] Delete temporary Flymake Elisp files
Previous Next
Reported by: Philip Kaludercic <philipk <at> posteo.net>
Date: Thu, 21 Apr 2022 16:43:01 UTC
Severity: normal
Tags: moreinfo, patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55056 in the body.
You can then email your comments to 55056 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Thu, 21 Apr 2022 16:43:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Philip Kaludercic <philipk <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 21 Apr 2022 16:43:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
My temporary directory appears to always be littered with flymake files.
The reason for this appears to be that the Elisp Flymake backend doesn't
always clean up after itself, when it should. In the worst case I can
run out of space and that can mess up a lot of things on a system.
The below patch adds a check to the sentinel to do so. I was a bit
paranoid and considered more process-states that might be necessary, but
I hope that someone with a better understanding of the process interface
will be able to help here.
In GNU Emacs 29.0.50 (build 7, x86_64-pc-linux-gnu, GTK+ Version 2.24.33, cairo version 1.16.0)
of 2022-04-18 built on icterid
Repository revision: 7b1881682bfbd1ff83d47b88fa8cca22c0290c17
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux 11 (bullseye)
Configured using:
'configure --with-native-compilation --with-cairo --with-harfbuzz
LDFLAGS=-flto 'CFLAGS=-march=native -mtune=native -pipe''
[0001-Delete-temporary-Flymake-Elisp-files-every-time-a-pr.patch (text/patch, attachment)]
[Message part 3 (text/plain, inline)]
--
Philip Kaludercic
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Fri, 22 Apr 2022 11:44:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 55056 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> The below patch adds a check to the sentinel to do so. I was a bit
> paranoid and considered more process-states that might be necessary, but
> I hope that someone with a better understanding of the process interface
> will be able to help here.
[...]
> + (when (memq (process-status proc) '(failed closed signal))
> + (message "Elisp flymake [%s]: %S" (buffer-file-name) (process-status proc))
> + (ignore-errors (delete-file temp-file))
> + (kill-buffer output-buffer)))
I'm not very familiar with the flymake machinery, but isn't the problem
a bit further up? That is:
:sentinel
(lambda (proc _event)
(when (eq (process-status proc) 'exit)
Shouldn't that just be (unless (process-live-p proc) ...)?
Perhaps João has a comment; added to the CCs.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Fri, 22 Apr 2022 11:57:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 55056 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Lars, your idea sounds pretty reasonable to me. In fact, you recently
touched
the Ruby backend example checker in the manual.
commit f5b4bb4a6fa3adcb653cab5dc760745b896320bb
Author: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Mon Oct 25 01:25:13 2021 +0200
Fix flymake example backend conditions in the manual
* doc/misc/flymake.texi (An annotated example backend): Also react
to `signal' process statuses (bug#51380).
diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi
--- a/doc/misc/flymake.texi
+++ b/doc/misc/flymake.texi
@@ -777,1 +777,1 @@
- (when (eq 'exit (process-status proc))
+ (when (memq (process-status proc) '(exit signal))
The only question is why both I and you didn't venture to just use
process-live-p
back then as you propose now. Because it seems to make sense. I personally
can't recall a reason other than my ignorance/oversight, but maybe you can?
João
On Fri, Apr 22, 2022 at 12:43 PM Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> Philip Kaludercic <philipk <at> posteo.net> writes:
>
> > The below patch adds a check to the sentinel to do so. I was a bit
> > paranoid and considered more process-states that might be necessary, but
> > I hope that someone with a better understanding of the process interface
> > will be able to help here.
>
> [...]
>
> > + (when (memq (process-status proc) '(failed closed signal))
> > + (message "Elisp flymake [%s]: %S" (buffer-file-name)
> (process-status proc))
> > + (ignore-errors (delete-file temp-file))
> > + (kill-buffer output-buffer)))
>
> I'm not very familiar with the flymake machinery, but isn't the problem
> a bit further up? That is:
>
> :sentinel
> (lambda (proc _event)
> (when (eq (process-status proc) 'exit)
>
> Shouldn't that just be (unless (process-live-p proc) ...)?
>
> Perhaps João has a comment; added to the CCs.
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
--
João Távora
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Fri, 22 Apr 2022 12:38:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 55056 <at> debbugs.gnu.org (full text, mbox):
João Távora <joaotavora <at> gmail.com> writes:
> The only question is why both I and you didn't venture to just use
> process-live-p back then as you propose now. Because it seems to make
> sense. I personally can't recall a reason other than my
> ignorance/oversight, but maybe you can?
Possibly because it's "new" -- process-live-p is from 2011, I think.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Sat, 23 Apr 2022 12:54:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 55056 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> The only question is why both I and you didn't venture to just use
>> process-live-p back then as you propose now. Because it seems to make
>> sense. I personally can't recall a reason other than my
>> ignorance/oversight, but maybe you can?
>
> Possibly because it's "new" -- process-live-p is from 2011, I think.
So I've now done this change in Emacs 29. Philip, does it fix the
issues you were seeing?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 23 Apr 2022 12:54:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Mon, 25 Apr 2022 07:35:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 55056 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>>> The only question is why both I and you didn't venture to just use
>>> process-live-p back then as you propose now. Because it seems to make
>>> sense. I personally can't recall a reason other than my
>>> ignorance/oversight, but maybe you can?
>>
>> Possibly because it's "new" -- process-live-p is from 2011, I think.
>
> So I've now done this change in Emacs 29. Philip, does it fix the
> issues you were seeing?
Yes, I can confirm that this solves the issue as well!
--
Philip Kaludercic
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#55056
; Package
emacs
.
(Mon, 25 Apr 2022 07:43:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 55056 <at> debbugs.gnu.org (full text, mbox):
Philip Kaludercic <philipk <at> posteo.net> writes:
> Yes, I can confirm that this solves the issue as well!
Thanks for checking; I'm closing this bug report, then.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 29.1, send any further explanations to
55056 <at> debbugs.gnu.org and Philip Kaludercic <philipk <at> posteo.net>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 25 Apr 2022 07:43:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 23 May 2022 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 30 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.