GNU bug report logs - #55056
[PATCH] Delete temporary Flymake Elisp files

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: João Távora <joaotavora <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Philip Kaludercic <philipk <at> posteo.net>, 55056 <at> debbugs.gnu.org
Subject: bug#55056: [PATCH] Delete temporary Flymake Elisp files
Date: Fri, 22 Apr 2022 12:57:57 +0100
[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)]

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.