GNU bug report logs - #79380
31.0.50; Flymake does not check Elisp code anymore

Previous Next

Package: emacs;

Reported by: Daniel Mendler <mail <at> daniel-mendler.de>

Date: Wed, 3 Sep 2025 21:31:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #35 received at 79380 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Mendler <mail <at> daniel-mendler.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 79380 <at> debbugs.gnu.org, Spencer Baugh <sbaugh <at> janestreet.com>
Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore,
 [PATCH] Fix null values of elisp-flymake-byte-compile-executable
Date: Sat, 06 Sep 2025 12:08:46 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Spencer Baugh <sbaugh <at> janestreet.com>
>> Cc: 79380 <at> debbugs.gnu.org,  Eli Zaretskii <eliz <at> gnu.org>
>> Date: Fri, 05 Sep 2025 14:26:49 -0400
>> 
>> > Right, even better.  Like this:
>> 
>> Ping, I'd like to install this patch to fix the breakage on master.
>
> I was waiting for Daniel to test the patch and say that there are no
> further issues with it.
>
> Daniel, please chime in and ack.

Works for me, yes.

But there is still a small inconsistency in the patch. If the defcustom
is set to an invalid type there will be an error. But if it is set to an
invalid executable we will get a warning. Is this desired?

I suggest to error in both cases to avoid false Flymake errors if the
executable is configured incorrectly, and maybe also flatten the
conditionals (getting rid of the case-of-case). I would have written
something like this:

(defun elisp-flymake-byte-compile--executable ()
  "Return absolute file name of the Emacs executable for flymake byte-compilation."
  (pcase elisp-flymake-byte-compile-executable
    (`nil (expand-file-name invocation-name invocation-directory))
    ((and (pred stringp) file)
     (when-let* (((not (file-name-absolute-p file)))
                 (pr (project-current)))
       (setq file (expand-file-name file (project-root pr))))
     (unless (file-executable-p file)
       (error "No such `elisp-flymake-byte-compile-executable': %s" file))
     file)
    (file (error "Invalid `elisp-flymake-byte-compile-executable': %S" file))))

>> Here's an updated version since Eli separately pushed the fix to the
>> defcustom.
>
> Thanks.  However, the log message still says the defcustom is being
> modified, which the patch doesn't do.

Daniel




This bug report was last modified 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.