From unknown Fri Sep 12 20:17:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#79380 <79380@debbugs.gnu.org> To: bug#79380 <79380@debbugs.gnu.org> Subject: Status: 31.0.50; Flymake does not check Elisp code anymore Reply-To: bug#79380 <79380@debbugs.gnu.org> Date: Sat, 13 Sep 2025 03:17:43 +0000 retitle 79380 31.0.50; Flymake does not check Elisp code anymore reassign 79380 emacs submitter 79380 Daniel Mendler severity 79380 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 03 17:30:29 2025 Received: (at submit) by debbugs.gnu.org; 3 Sep 2025 21:30:29 +0000 Received: from localhost ([127.0.0.1]:43000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1utv3l-0002Fg-5c for submit@debbugs.gnu.org; Wed, 03 Sep 2025 17:30:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50878) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1utv3f-0002FF-Lr for submit@debbugs.gnu.org; Wed, 03 Sep 2025 17:30:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utv3X-0003Yb-Ua for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2025 17:30:16 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1utv3U-0000Oh-LO for bug-gnu-emacs@gnu.org; Wed, 03 Sep 2025 17:30:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=T0B98WU+DrZfggfo6NqwWzI1X3XJJzCXkaYkOhTFrao=; b=jDfmpeIq4yrdA200hHun7FQqiY X4pvIb/89ApnLmhGGVb61HDqgY2m/jmqSmILDGI+Jc/I3dOniL1lELXDzh6zIoKCOmpahFtGbai6E n0iyH9uslAElUSps0zLYMsjOf0NWSxdWHrfIyobpspv2QSwic4rgXtNSwVwztzHeLUFU=; From: Daniel Mendler To: bug-gnu-emacs@gnu.org Subject: 31.0.50; Flymake does not check Elisp code anymore X-Debbugs-Cc: Date: Wed, 03 Sep 2025 23:29:49 +0200 Message-ID: <87o6rr1aya.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) If elisp-flymake-byte-compile-executable is nil (the default), the absolute file predicate fails and as a result Flymake does not check Elisp anymore: (file-name-absolute-p elisp-flymake-byte-compile-executable) Workaround: (setq elisp-flymake-byte-compile-executable "emacs") In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-09-03 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars 'CFLAGS=-O3 -mtune=native -march=native'' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 10:38:45 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 14:38:45 +0000 Received: from localhost ([127.0.0.1]:48190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuB6r-0001n9-4C for submit@debbugs.gnu.org; Thu, 04 Sep 2025 10:38:45 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:33331) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuB6k-0001mo-Sz for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 10:38:41 -0400 From: Spencer Baugh To: Daniel Mendler Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore In-Reply-To: <87o6rr1aya.fsf@daniel-mendler.de> (Daniel Mendler's message of "Wed, 03 Sep 2025 23:29:49 +0200") References: <87o6rr1aya.fsf@daniel-mendler.de> Date: Thu, 04 Sep 2025 10:38:32 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1756996712; bh=qp7MsABM/PKp4ea/g19G5PI0WcIVzLXFcOPB8ufkvtU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=rtjJvPxJYLksOSCjys1VP/EVi8HieC03t/+797daWzFCrWVvztMZbRLtj4fs3Ox2Y 71M7Icsl30lFmsL5QicOsqs3nzSQx1vmLfZtDFunwWCuTXVwunWHPNNN0YQXZuETLQ UfxAFpWxShfKgjSAVl/iEC0bAzCmkGXi/OIMvWAJm5mQqwKjdWKdaEihbrsOkcm42H AaoKGNsLHtZbJM17W5iyGa+JlpTf1BFu9tmAE3hh6PyRgKYdFOwRbwdYMn18wSvDD6 0o+nyfxNNH+Eoe+96va+uF9Dy8SVKsDYY2ORsNssCR2fyjdDldbDaG4UGvboRw8eNW WGML+nWlTjRfQ== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > If elisp-flymake-byte-compile-executable is nil (the default), the > absolute file predicate fails and as a result Flymake does not check > Elisp anymore: > > (file-name-absolute-p elisp-flymake-byte-compile-executable) Apologies, I accidentally posted an old version of the patch which was then installed. The attached should fix it. Please try it (and then feel free to push it if it works). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-null-values-of-elisp-flymake-byte-compile-execut.patch >From 425e3f4ab95faf7c0e4a749e0c428f4c05f32cfa Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 4 Sep 2025 10:36:17 -0400 Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executable * lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile--executable): Properly check for nil. (bug#79380) --- lisp/progmodes/elisp-mode.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e8344852829..c6951810c3e 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2301,13 +2301,14 @@ elisp-flymake-byte-compile--executable "Return absolute file name of the Emacs executable for flymake byte-compilation." (let ((filename (cond + ((null elisp-flymake-byte-compile-executable) nil) ((file-name-absolute-p elisp-flymake-byte-compile-executable) elisp-flymake-byte-compile-executable) ((stringp elisp-flymake-byte-compile-executable) (when-let* ((pr (project-current))) (file-name-concat (project-root pr) elisp-flymake-byte-compile-executable)))))) - (if (file-executable-p filename) + (if (and filename (file-executable-p filename)) filename (when elisp-flymake-byte-compile-executable (message "No such `elisp-flymake-byte-compile-executable': %s" -- 2.43.7 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 11:34:05 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 15:34:05 +0000 Received: from localhost ([127.0.0.1]:48402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuByO-00056t-5s for submit@debbugs.gnu.org; Thu, 04 Sep 2025 11:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37882) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuByI-00055q-Lx for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 11:34:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uuBy8-0001Mo-4X; Thu, 04 Sep 2025 11:33:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ajl5DXP2Q6KI/NkU2z++70huVApEzKmMk8sEaQH8sWI=; b=W543nIH76Ltx zu2oYDBfVH1eG6vq274qvH3gyVcVjeZlLkriS+G0MzAHq3r2x+mQwWGYRjIGRx93iuS5038NIJHom lztYCDsImjlGLL3QtJfH16wU2F4TY8vRdhbAL9iwN2KvgyqyYfQNcquchUDyP6UQudSHZfqk1Kr5H 7TobtxpwvYH9NJXkCb+cnpmdAPXxs0JZ7DUBGlNDoFktG3P+eFrcKdbPyOvEZ0ielkJTKJKPqo0NX f2OpLEjVcyHAlYwXxXEMYyermk2LC4O3+nhK+WUArdceWwm5rDFIIv5vVPBeMEG8A39qgfrUTQSk9 POK+dvUsH0P4Pv3F4yi5+g==; Date: Thu, 04 Sep 2025 18:33:44 +0300 Message-Id: <863492jkpz.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (bug-gnu-emacs@gnu.org) Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore References: <87o6rr1aya.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 79380@debbugs.gnu.org > Date: Thu, 04 Sep 2025 10:38:32 -0400 > From: Spencer Baugh via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Daniel Mendler writes: > > If elisp-flymake-byte-compile-executable is nil (the default), the > > absolute file predicate fails and as a result Flymake does not check > > Elisp anymore: > > > > (file-name-absolute-p elisp-flymake-byte-compile-executable) > > Apologies, I accidentally posted an old version of the patch which was > then installed. The attached should fix it. Please try it (and then > feel free to push it if it works). > > >From 425e3f4ab95faf7c0e4a749e0c428f4c05f32cfa Mon Sep 17 00:00:00 2001 > From: Spencer Baugh > Date: Thu, 4 Sep 2025 10:36:17 -0400 > Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executable > > * lisp/progmodes/elisp-mode.el > (elisp-flymake-byte-compile--executable): Properly check for > nil. (bug#79380) > --- > lisp/progmodes/elisp-mode.el | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el > index e8344852829..c6951810c3e 100644 > --- a/lisp/progmodes/elisp-mode.el > +++ b/lisp/progmodes/elisp-mode.el > @@ -2301,13 +2301,14 @@ elisp-flymake-byte-compile--executable > "Return absolute file name of the Emacs executable for flymake byte-compilation." > (let ((filename > (cond > + ((null elisp-flymake-byte-compile-executable) nil) > ((file-name-absolute-p elisp-flymake-byte-compile-executable) > elisp-flymake-byte-compile-executable) > ((stringp elisp-flymake-byte-compile-executable) > (when-let* ((pr (project-current))) > (file-name-concat (project-root pr) > elisp-flymake-byte-compile-executable)))))) > - (if (file-executable-p filename) > + (if (and filename (file-executable-p filename)) > filename > (when elisp-flymake-byte-compile-executable > (message "No such `elisp-flymake-byte-compile-executable': %s" > -- > 2.43.7 Shouldn't the tests of the value of the user option use stringp instead of null? From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 11:45:36 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 15:45:36 +0000 Received: from localhost ([127.0.0.1]:48430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuC9X-0005gl-Qz for submit@debbugs.gnu.org; Thu, 04 Sep 2025 11:45:36 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:59027) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuC9S-0005gL-8G for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 11:45:32 -0400 Received: from mail-lf1-f69.google.com ([209.85.167.69]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.98.2) id 1uuC9M-0000000075c-1eOs for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 11:45:24 -0400 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-55f68ad3a06so651009e87.0 for <79380@debbugs.gnu.org>; Thu, 04 Sep 2025 08:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1757000723; x=1757605523; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aeWkfnHVuDB4ThKpmQECOx5cwwzs2I1HAtVCnXnxbOs=; b=dFvKbPT+2tl9ZpUdwGFqoRvvHpcgBM1Oiv7noDWYytty3L8NQWGP/cJ461PoEe16oD pGzlDbc1gME75o4OEbmuvi93SkIxD1BUEK5Y/p/FZRBb5YqzsMvCJ0ybEmUfnbRzLR9K YNuhRc2kxWn6/PAdQLYrY+ZM7j7wj/eCjiJjs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1757000724; bh=aeWkfnHVuDB4ThKpmQECOx5cwwzs2I1HAtVCnXnxbOs=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=R/XyKyEOeYurS4eo13Ta81Gubj5lcIDo3VhQ4TOm+Uwnw2RqeFjh2AbPwpXYtqIJ9 YTJY07uJPmUoL6YlaQmPNg6P4NOqBoFxjAo3E535G9QQi4RZ5+I5vAZhfpNqbgE9Lm mEwHehsVYJelqQ5HBAQ+/oz3ir4VhV/UdW60Utz4I77+wSXR4pA0qjwWnyknvh//De z/YfcsbxLT5qUuxbh115htN/FEfyMMWF0HQP56+myLldjyarjJDDyvGzoi5rbQeGrm Ysq2u++0xoZhEji5sRLlfMnBKukHR71+Sdw1lJq1UtEyRGwdtJZpEG69/usDVvRt9Y Icc8yWmkV9jUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757000723; x=1757605523; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aeWkfnHVuDB4ThKpmQECOx5cwwzs2I1HAtVCnXnxbOs=; b=n6dfeA3xgv6+3xh0subZERnNbmHKLGTLX7ICSiccdOoVmz1qtkbuzMh/al/CLEEvmB hmeOaMsg1Uu7+PTL2pNhOlPi8sH+OSYWWIIAohzy7qyI/c9zViafv5v+gW6T15/Bbvzw ho896SZVJ7DMK/fUVc3zshjx+Waxr6PYc5P9mEwprdulZk9u3+Bdb6F7h+CHMa+P2IiD Wb8VnXgu4vodyb/vUZo/J0FF5tY3aatvrWPi6AnvDyuInzhD/ZkA8YDtGQuLPmCnMWtX P+U7vhFFQhiw5b4r2t6ByqebkeduxnO3UmTIRdy/aK8P2Qj44jCiGO27vlPHtW9KudO7 xUrw== X-Forwarded-Encrypted: i=1; AJvYcCXxyHeYJfdSotgYp87Wk5JLfsWkrF4XdvB2IOcIw/Rt73MS1hm9ZZUy/z5z/YUW0pAZ5Aswpg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxQoK8pWDEWZJQpRKk88ABk6WjY6vm9q0gna+AGzkOfrHxYpJIJ CBNVgOAjRg0MQ5nV0KUdsiD1pwK9wr78aPuhGY9aNqF+1DxzVBzOXPGHvfwo/L5CjYI1veTh5YS 8gaMyXcUKLUyN6ZN6npKqj3xinfiFxN1TLVcuKbs9unv2xjWADE9D6qJkLAbHqx6B3QqIXZG/ut k4uKllQ3JRkX9LxIUZnT3EINhbwVE8Ig== X-Gm-Gg: ASbGncsUh5bHlnVna0aYfuhfEJ99JAQ1BJSDdy7/HF82GqFu847LIIYPtJWsLWRUnmn ZSb4q5FoCznyJ5zWCqW0gOn7Qj9oXrwmciMz6TrMs80wtCdssiVvc6OlHJ7ftxiiRepIXVYk4Xr kM3ULLXxstfmQTAuf8e7Bg X-Received: by 2002:a05:6512:308f:b0:55f:44ff:503b with SMTP id 2adb3069b0e04-55f7090752emr6891382e87.27.1757000723044; Thu, 04 Sep 2025 08:45:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGM7JfqImxjZA2QnQTx8DpGSk05kA5WqZ7h61XI0R2HvmNIIsb3Bj299lM2EtvK++xteC6Yy+yvebK2tdJjC5Y= X-Received: by 2002:a05:6512:308f:b0:55f:44ff:503b with SMTP id 2adb3069b0e04-55f7090752emr6891373e87.27.1757000722541; Thu, 04 Sep 2025 08:45:22 -0700 (PDT) MIME-Version: 1.0 References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> In-Reply-To: <863492jkpz.fsf@gnu.org> From: Spencer Baugh Date: Thu, 4 Sep 2025 11:45:12 -0400 X-Gm-Features: Ac12FXzcW07b71gXVoXCBTVFzIWj-McmHGlLz8SxuH30kVR9V6I6i3vPXu6GqQs Message-ID: Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore To: Eli Zaretskii Content-Type: multipart/alternative; boundary="000000000000f00388063dfb9b90" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --000000000000f00388063dfb9b90 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 4, 2025, 11:33=E2=80=AFAM Eli Zaretskii wrote: > > Cc: 79380@debbugs.gnu.org > > Date: Thu, 04 Sep 2025 10:38:32 -0400 > > From: Spencer Baugh via "Bug reports for GNU Emacs, > > the Swiss army knife of text editors" > > > > Daniel Mendler writes: > > > If elisp-flymake-byte-compile-executable is nil (the default), the > > > absolute file predicate fails and as a result Flymake does not check > > > Elisp anymore: > > > > > > (file-name-absolute-p elisp-flymake-byte-compile-executable) > > > > Apologies, I accidentally posted an old version of the patch which was > > then installed. The attached should fix it. Please try it (and then > > feel free to push it if it works). > > > > >From 425e3f4ab95faf7c0e4a749e0c428f4c05f32cfa Mon Sep 17 00:00:00 2001 > > From: Spencer Baugh > > Date: Thu, 4 Sep 2025 10:36:17 -0400 > > Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executab= le > > > > * lisp/progmodes/elisp-mode.el > > (elisp-flymake-byte-compile--executable): Properly check for > > nil. (bug#79380) > > --- > > lisp/progmodes/elisp-mode.el | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.e= l > > index e8344852829..c6951810c3e 100644 > > --- a/lisp/progmodes/elisp-mode.el > > +++ b/lisp/progmodes/elisp-mode.el > > @@ -2301,13 +2301,14 @@ elisp-flymake-byte-compile--executable > > "Return absolute file name of the Emacs executable for flymake > byte-compilation." > > (let ((filename > > (cond > > + ((null elisp-flymake-byte-compile-executable) nil) > > ((file-name-absolute-p elisp-flymake-byte-compile-executable= ) > > elisp-flymake-byte-compile-executable) > > ((stringp elisp-flymake-byte-compile-executable) > > (when-let* ((pr (project-current))) > > (file-name-concat (project-root pr) > > > elisp-flymake-byte-compile-executable)))))) > > - (if (file-executable-p filename) > > + (if (and filename (file-executable-p filename)) > > filename > > (when elisp-flymake-byte-compile-executable > > (message "No such `elisp-flymake-byte-compile-executable': %s" > > -- > > 2.43.7 > > Shouldn't the tests of the value of the user option use stringp > instead of null? > Is that the convention? I always feel like it's better to test for null explicitly, so that if the user sets the variable to a symbol or list or something they get an error which can help them track down their mistake. > --000000000000f00388063dfb9b90 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Thu, Sep 4, 2025, 11:33=E2=80=AFA= M Eli Zaretskii <eliz@gnu.org> wr= ote:
> Cc: 79380@debbugs.gnu.= org
> Date: Thu, 04 Sep 2025 10:38:32 -0400
> From:=C2=A0 Spencer Baugh via "Bug reports for GNU Emacs,
>=C2=A0 the Swiss army knife of text editors" <bug-gnu-emacs@= gnu.org>
>
> Daniel Mendler <mail@daniel-mendler.de> writes:
> > If elisp-flymake-byte-compile-executable is nil (the default), th= e
> > absolute file predicate fails and as a result Flymake does not ch= eck
> > Elisp anymore:
> >
> > (file-name-absolute-p elisp-flymake-byte-compile-executable)
>
> Apologies, I accidentally posted an old version of the patch which was=
> then installed.=C2=A0 The attached should fix it.=C2=A0 Please try it = (and then
> feel free to push it if it works).
>
> >From 425e3f4ab95faf7c0e4a749e0c428f4c05f32cfa Mon Sep 17 00:00:00 = 2001
> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Thu, 4 Sep 2025 10:36:17 -0400
> Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executa= ble
>
> * lisp/progmodes/elisp-mode.el
> (elisp-flymake-byte-compile--executable): Properly check for
> nil. (bug#79380)
> ---
>=C2=A0 lisp/progmodes/elisp-mode.el | 3 ++-
>=C2=A0 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.= el
> index e8344852829..c6951810c3e 100644
> --- a/lisp/progmodes/elisp-mode.el
> +++ b/lisp/progmodes/elisp-mode.el
> @@ -2301,13 +2301,14 @@ elisp-flymake-byte-compile--executable
>=C2=A0 =C2=A0 "Return absolute file name of the Emacs executable f= or flymake byte-compilation."
>=C2=A0 =C2=A0 (let ((filename
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(cond
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((null elisp-flymake-byte-compile-= executable) nil)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((file-name-absolute-p elisp-= flymake-byte-compile-executable)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0elisp-flymake-byte-comp= ile-executable)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((stringp elisp-flymake-byte-= compile-executable)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when-let* ((pr (projec= t-current)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(file-name-conca= t (project-root pr)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0elisp-flymake-byte-compile-= executable))))))
> -=C2=A0 =C2=A0 (if (file-executable-p filename)
> +=C2=A0 =C2=A0 (if (and filename (file-executable-p filename))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 filename
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when elisp-flymake-byte-compile-executable=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (message "No such `elisp-flymak= e-byte-compile-executable': %s"
> --
> 2.43.7

Shouldn't the tests of the value of the user option use stringp
instead of null?

Is that the convention?=C2=A0 I always feel like it's b= etter to test for null explicitly, so that if the user sets the variable to= a symbol or list or something they get an error which can help them track = down their mistake.
--000000000000f00388063dfb9b90-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 12:04:00 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 16:04:00 +0000 Received: from localhost ([127.0.0.1]:48509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuCRK-0006jC-MK for submit@debbugs.gnu.org; Thu, 04 Sep 2025 12:04:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33024) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuCRB-0006ig-Do for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 12:03:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uuCR3-000849-Id; Thu, 04 Sep 2025 12:03:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=JuDMAHKYirlSmMaRp0wcFtPxB5dpxynsthJQucbUX+o=; b=ZezfuzIdVdLJ eQG9mLPg+fxEK1NP8fr9yunP/y/7dB0YgZlO6iScV0GpTVtZNou37Dc5WuQHnE/xlN9SaHP1V2sl7 IZ5sLJqto7eLh9rc0ZAY/ID/6Ai97T8FNO/vq86hmf3EF0h8Yq9wwKqTAZFq/9Z5dGKpfI/bRI5je FZ3sDAD4pSDeA/PSmTuIqpgNeuqM+2hqKFmravYUk7YMuyUmyTfG7M2/p2M9+Nvr2RyDCAqfcznfj foPs1A4A6drxOPFgPNobBshgItzbKZ5IBQnL8v+JbS15gHdDRcavamhi4SrlExrT8+4b/PZH04Nja QhuHTQ6CojJAfy6oQPzm+w==; Date: Thu, 04 Sep 2025 19:03:02 +0300 Message-Id: <861pomjjd5.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Thu, 4 Sep 2025 11:45:12 -0400) Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Date: Thu, 4 Sep 2025 11:45:12 -0400 > Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org > > Shouldn't the tests of the value of the user option use stringp > instead of null? > > Is that the convention? I always feel like it's better to test for null explicitly, so that if the user sets the > variable to a symbol or list or something they get an error which can help them track down their mistake. I don't think this is about conventions. In this specific case, any value that is not a string will signal an error in elisp-flymake-byte-compile--executable, exactly like nil did in the patch that was installed. So I think any value that is not a string should be handled as nil (in addition to the checking of strings that the code already does). From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 12:20:36 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 16:20:36 +0000 Received: from localhost ([127.0.0.1]:48538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuChP-0007Y8-RQ for submit@debbugs.gnu.org; Thu, 04 Sep 2025 12:20:36 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:60477) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuChL-0007Xp-Vw for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 12:20:32 -0400 Received: from mail-lj1-f197.google.com ([209.85.208.197]) by mxgoog2.mail.janestreet.com with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) (Exim 4.98.2) id 1uuChG-00000000BVX-13qA for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 12:20:26 -0400 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-333f823e1b9so7527811fa.1 for <79380@debbugs.gnu.org>; Thu, 04 Sep 2025 09:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; t=1757002825; x=1757607625; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=l8lKlOZixVdBOC0KUE4oe3JE6YJ1ehuu2bjV3r1uDWg=; b=O2d884lLSWWZccCDfHXUMjeDJ2HWpPU9Rk7ZbaPJDo9yhnrqtieDlAoGoPXJpfo9+h goo6KCKsbsRgYkYJfRUrl3BqCsc5/7P1pTqvfTvsYPR77K88TpJgNKkrmYxSX4q9D0/Q srP466G7JOrBxu35bAe/odz+u0wMQ4/SCFY/Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1757002826; bh=l8lKlOZixVdBOC0KUE4oe3JE6YJ1ehuu2bjV3r1uDWg=; h=References:In-Reply-To:From:Date:Subject:To:Cc; b=HMYzyyq/tajQUEU1NKmqV1g36mlPy16+n+3YJA3FX8LsN7Iv2YT9+/DuGcU7JfJEr 8vzhcDIRLnTff/1MS+4VZ9pfw4mHf4d2Ny1Bwm/PagHxLo9qKhSyiAAvemdGgKEaSQ 1byayl+h4TQejBSZl2Ysqc0U3ICR5zhu81AGSGh88rn3ZdjzCz0IzhJ/OEgMSI3ixF eZkc6nZfIyS2DNoE1ynQRSea0/Jk8oC1D2/1oAaRi1aRSi/GCOdv8ILHMoWP+HKG+N L8aSjNiIPTnAIhNL9UwZtYMVNewg5asleuKU3nHoomWXpOu7SBBQDIn/N8ZCAdSTaj jBjJK0qv+no3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757002825; x=1757607625; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=l8lKlOZixVdBOC0KUE4oe3JE6YJ1ehuu2bjV3r1uDWg=; b=ljO3I/CQRR28QT4/U+//jFvWCPwKLpbkYUcsF08RmCML8rZDmIQDQu2kSqC5pAqfCf dFzPDaiw4FUTkGfigl+fzwbjAiqC1DsHoF16V8FC3u7Vm/YUf85h7OFIX0p4opxIhWYK m/zpUAf+ruexs1QwwSi82hlN72poFjqzrBjkhzygFCPjEaBKrRMowSp1dMtqW31WYQDs omPrFMwVYG3foOfI05z5v+r+Xt95ubbOqAL6/UwsDqlhUxBMztxT6adJY6XoMV7NZ2Ww g022zrdiv3AsOYRQHqWzqv9A7uxglKzgknkb0y2YtEynPv3ZlnwPVIJKmQRGIhpSnl3I sJVg== X-Forwarded-Encrypted: i=1; AJvYcCUPZl7GU6/AkVgzRD0RH4FEkKUI1C2ca4rc947QqoztDm9B9CHI0ng+hRFNRMzPUodHv40GHQ==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yxe4E6k3dEu200zZ4Sx2EYRfYimjd4DYHrED7OamrknsXApBpPU 8JNbwpEjarQJnQWgoUxBAClfBeSx1qjukL6WR2SECBtklaqhTsUzn9+sClZwdFFl+GOEvHRmwAd m4COXkaXmkllJEsSsAXsyXpdMU1Ru4ZSybo61MWeyu7CrKQtB5wqJIWgmEfQivwD5ZXncmtJDpP c47ipIcde1h20OBe0kK38KyFlam4LjzA== X-Gm-Gg: ASbGncuilovoThNbuqR7UPX4fq3C8767BMsswyvjZKIeGFY+OjVnbnrxaTODa9Cgh1M jw6yTz58nZ3RhS9gd+fgw050DLmjq4eUpp7JqYlR0mtZdATBMnFFRyTltWeUimXxGcSncx0YXzO eb3Ct2DejVQLqJ1g4UmH/q X-Received: by 2002:a05:651c:31d8:b0:337:e0d9:69a0 with SMTP id 38308e7fff4ca-3381e727fa8mr615001fa.20.1757002824923; Thu, 04 Sep 2025 09:20:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFclHbkeOSsj8kusSkrlyK8RZLGJvhraj6d492CZGz4f1u+reSXqHtyUv7extgJGpX+aGIrdRuYH4W9uLboVxg= X-Received: by 2002:a05:651c:31d8:b0:337:e0d9:69a0 with SMTP id 38308e7fff4ca-3381e727fa8mr614901fa.20.1757002824427; Thu, 04 Sep 2025 09:20:24 -0700 (PDT) MIME-Version: 1.0 References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> In-Reply-To: <861pomjjd5.fsf@gnu.org> From: Spencer Baugh Date: Thu, 4 Sep 2025 12:20:14 -0400 X-Gm-Features: Ac12FXxHrzlrlXDZGZ70B8agPQt93VCX0CIWtEuOfF-g3sdnw-b6WC--LcrcDFo Message-ID: Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000003841f3063dfc19bb" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --0000000000003841f3063dfc19bb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 4, 2025, 12:03=E2=80=AFPM Eli Zaretskii wrote: > > From: Spencer Baugh > > Date: Thu, 4 Sep 2025 11:45:12 -0400 > > Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org > > > > Shouldn't the tests of the value of the user option use stringp > > instead of null? > > > > Is that the convention? I always feel like it's better to test for nul= l > explicitly, so that if the user sets the > > variable to a symbol or list or something they get an error which can > help them track down their mistake. > > I don't think this is about conventions. In this specific case, any > value that is not a string will signal an error in > elisp-flymake-byte-compile--executable, exactly like nil did in the > patch that was installed. So I think any value that is not a string > should be handled as nil (in addition to the checking of strings that > the code already does). > Yes, my suggestion is that signaling an error is good because it shows that the user's configuration is wrong. > --0000000000003841f3063dfc19bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Thu, Sep 4, 2025, 12:03=E2=80= =AFPM Eli Zaretskii <eliz@gnu.org>= ; wrote:
> From: Spencer Baugh &= lt;sbaugh@janestreet.com>
> Date: Thu, 4 Sep 2025 11:45:12 -0400
> Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org
>
>=C2=A0 Shouldn't the tests of the value of the user option use stri= ngp
>=C2=A0 instead of null?
>
> Is that the convention?=C2=A0 I always feel like it's better to te= st for null explicitly, so that if the user sets the
> variable to a symbol or list or something they get an error which can = help them track down their mistake.

I don't think this is about conventions.=C2=A0 In this specific case, a= ny
value that is not a string will signal an error in
elisp-flymake-byte-compile--executable, exactly like nil did in the
patch that was installed.=C2=A0 So I think any value that is not a string should be handled as nil (in addition to the checking of strings that
the code already does).

<= /div>

Yes, my suggestion is th= at signaling an error is good because it shows that the user's configur= ation is wrong.
--0000000000003841f3063dfc19bb-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 12:24:21 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 16:24:21 +0000 Received: from localhost ([127.0.0.1]:48557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuCl2-0007fM-Jt for submit@debbugs.gnu.org; Thu, 04 Sep 2025 12:24:20 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:51189 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuCky-0007er-WD for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 12:24:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Tlv6Ro+aFhS40o1RwJSr/xMZhNWaWrBQA+xw3bAZt98=; b=FQUJXyiZhyyuAm48kl+R1NdH2h de9Z3UuyE5PCSgGgacPA+5ic9YKBjrA/Pr3ctpfNwPcZyPc9upJQbv6wyQKYyejKgxpjkwwxg1QVJ +4Ck4tSis+MCy8DwGdr7turPt6o+xWF0zJibawEVggwh5F597bUYRBwjJl9Xnfaa+Jg8=; From: Daniel Mendler To: Spencer Baugh Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore In-Reply-To: References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> Date: Thu, 04 Sep 2025 18:24:08 +0200 Message-ID: <87bjnqjidz.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Thanks for taking a look at this problem! Spencer Baugh writes: > On Thu, Sep 4, 2025, 12:03=E2=80=AFPM Eli Zaretskii wrote: >> > From: Spencer Baugh >> > Date: Thu, 4 Sep 2025 11:45:12 -0400 >> > Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org >> > >> > Shouldn't the tests of the value of the user option use stringp >> > instead of null? >> > >> > Is that the convention? I always feel like it's better to test for nu= ll >> explicitly, so that if the user sets the >> > variable to a symbol or list or something they get an error which can >> help them track down their mistake. >> >> I don't think this is about conventions. In this specific case, any >> value that is not a string will signal an error in >> elisp-flymake-byte-compile--executable, exactly like nil did in the >> patch that was installed. So I think any value that is not a string >> should be handled as nil (in addition to the checking of strings that >> the code already does). >> > > Yes, my suggestion is that signaling an error is good because it shows th= at > the user's configuration is wrong. I agree that signaling an error would be good. As an alternative you could do it explicitly. Check against nil to use the defaults, check stringp for a user defined path and throw an explicit error in the other cases. Daniel From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 04 12:35:03 2025 Received: (at 79380) by debbugs.gnu.org; 4 Sep 2025 16:35:04 +0000 Received: from localhost ([127.0.0.1]:48601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuCvO-0008Ap-Oy for submit@debbugs.gnu.org; Thu, 04 Sep 2025 12:35:03 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:53927) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuCvB-0008AI-MU for 79380@debbugs.gnu.org; Thu, 04 Sep 2025 12:34:57 -0400 From: Spencer Baugh To: Daniel Mendler Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore In-Reply-To: <87bjnqjidz.fsf@daniel-mendler.de> (Daniel Mendler's message of "Thu, 04 Sep 2025 18:24:08 +0200") References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> Date: Thu, 04 Sep 2025 12:34:43 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1757003683; bh=48YmO04HaPWRbsv8OOmoFQPIxAqhV2mVf9Fmb5VLzN0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=kwAimifoQfWs050dfUEWCu87G34NXdm4rAQ5/7QZVRLIvAushzT8CbsnBjahhCMLW 7h9bEVr8rIkW9m7VV2z+oqOA1i1gKZ16RxsijhOPuZKy28RpVf7tyrXBgeKp5jmx8X QiNOxlC3Fd0nYrglLK3SPoJqjSvz2j1ONA1WsK57NG1wuunCFa1rsI9P6kKVEPnkNa qcYooF8RiHjAlpGpZ9HCpFSBxqiwZ2OFDkuZKetdcYOD8fv+tur257xiT/snRkFAhu sLPmqEv0phQpwCWgbD0kNo1gyevfC0NGiUbf7vIYZmDapVAfEIcwYcbbMby2fihsq0 tskhE6JqpTZyg== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Daniel Mendler writes: > Thanks for taking a look at this problem! > > Spencer Baugh writes: >> On Thu, Sep 4, 2025, 12:03=E2=80=AFPM Eli Zaretskii wrote: >>> > From: Spencer Baugh >>> > Date: Thu, 4 Sep 2025 11:45:12 -0400 >>> > Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org >>> > >>> > Shouldn't the tests of the value of the user option use stringp >>> > instead of null? >>> > >>> > Is that the convention? I always feel like it's better to test for n= ull >>> explicitly, so that if the user sets the >>> > variable to a symbol or list or something they get an error which can >>> help them track down their mistake. >>> >>> I don't think this is about conventions. In this specific case, any >>> value that is not a string will signal an error in >>> elisp-flymake-byte-compile--executable, exactly like nil did in the >>> patch that was installed. So I think any value that is not a string >>> should be handled as nil (in addition to the checking of strings that >>> the code already does). >>> >> >> Yes, my suggestion is that signaling an error is good because it shows t= hat >> the user's configuration is wrong. > > I agree that signaling an error would be good. As an alternative you > could do it explicitly. Check against nil to use the defaults, check > stringp for a user defined path and throw an explicit error in the other > cases. Right, even better. Like this: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-null-values-of-elisp-flymake-byte-compile-execut.patch >From 7801088c56a2c06fd3cd598f64343598911b76da Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 4 Sep 2025 10:36:17 -0400 Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executable * lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile-executable): Improve defcustom type. (elisp-flymake-byte-compile--executable): Properly check for nil. (bug#79380) --- lisp/progmodes/elisp-mode.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index e8344852829..b660eb74c05 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2292,7 +2292,7 @@ elisp-flymake-byte-compile-executable If nil, or if the file named by this does not exist, Flymake will use the same executable as the running Emacs, as specified by the variables `invocation-name' and `invocation-directory'." - :type 'file + :type '(choice (const :tag "Running Emacs executable" nil) file) :group 'lisp :version "31.1") @@ -2301,13 +2301,16 @@ elisp-flymake-byte-compile--executable "Return absolute file name of the Emacs executable for flymake byte-compilation." (let ((filename (cond - ((file-name-absolute-p elisp-flymake-byte-compile-executable) - elisp-flymake-byte-compile-executable) + ((null elisp-flymake-byte-compile-executable) nil) ((stringp elisp-flymake-byte-compile-executable) - (when-let* ((pr (project-current))) - (file-name-concat (project-root pr) - elisp-flymake-byte-compile-executable)))))) - (if (file-executable-p filename) + (if (file-name-absolute-p elisp-flymake-byte-compile-executable) + elisp-flymake-byte-compile-executable + (when-let* ((pr (project-current))) + (file-name-concat (project-root pr) + elisp-flymake-byte-compile-executable)))) + (t (error "Invalid `elisp-flymake-byte-compile-executable': %s" + elisp-flymake-byte-compile-executable))))) + (if (and filename (file-executable-p filename)) filename (when elisp-flymake-byte-compile-executable (message "No such `elisp-flymake-byte-compile-executable': %s" -- 2.43.7 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 05 14:27:00 2025 Received: (at 79380) by debbugs.gnu.org; 5 Sep 2025 18:27:00 +0000 Received: from localhost ([127.0.0.1]:57304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uub9I-0002HT-2S for submit@debbugs.gnu.org; Fri, 05 Sep 2025 14:27:00 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:59155) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uub9C-0002H5-QA for 79380@debbugs.gnu.org; Fri, 05 Sep 2025 14:26:56 -0400 From: Spencer Baugh To: Daniel Mendler Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore, [PATCH] Fix null values of elisp-flymake-byte-compile-executable In-Reply-To: (Spencer Baugh's message of "Thu, 04 Sep 2025 12:34:43 -0400") References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> Date: Fri, 05 Sep 2025 14:26:49 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1757096809; bh=KnHqo/WdbLPeV2uVuYy+/kdwlhZEBlXtuIoY1/owveA=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=JIedsvirEhgIL7O9SrIGNnk3SMSPqSHMgM+Evm93Iz08z3ZF3+Omw4/qPId28d1J6 eMnNsB5eqE2fqjjez2cywOgxbcA3tcUmVSiVhsXQaxhsiBU3HUcxuW7iIyoAcmL/Am nARNHCPczxHzjQHRjSHgRVS5vw/lbEMhT9rndWINknVUP4INMAMhhvw/qgvT1zOg5W i1IYqoJJlAnoRyLcFtAOkG12YatdHZRZH5RCVljZqZ+r7QVueLxzQ49/lT+FgsnU0Q l6SblwCa3mzwhF3fjhHs7c20821ckTwb5PmXtIjIWmuch8MMOr9mlP5lQCGWzC6d/e NcLxppr3AfmHg== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Spencer Baugh writes: > Daniel Mendler writes: > >> Thanks for taking a look at this problem! >> >> Spencer Baugh writes: >>> On Thu, Sep 4, 2025, 12:03=E2=80=AFPM Eli Zaretskii wrot= e: >>>> > From: Spencer Baugh >>>> > Date: Thu, 4 Sep 2025 11:45:12 -0400 >>>> > Cc: mail@daniel-mendler.de, 79380@debbugs.gnu.org >>>> > >>>> > Shouldn't the tests of the value of the user option use stringp >>>> > instead of null? >>>> > >>>> > Is that the convention? I always feel like it's better to test for = null >>>> explicitly, so that if the user sets the >>>> > variable to a symbol or list or something they get an error which can >>>> help them track down their mistake. >>>> >>>> I don't think this is about conventions. In this specific case, any >>>> value that is not a string will signal an error in >>>> elisp-flymake-byte-compile--executable, exactly like nil did in the >>>> patch that was installed. So I think any value that is not a string >>>> should be handled as nil (in addition to the checking of strings that >>>> the code already does). >>>> >>> >>> Yes, my suggestion is that signaling an error is good because it shows = that >>> the user's configuration is wrong. >> >> I agree that signaling an error would be good. As an alternative you >> could do it explicitly. Check against nil to use the defaults, check >> stringp for a user defined path and throw an explicit error in the other >> cases. > > Right, even better. Like this: Ping, I'd like to install this patch to fix the breakage on master. Here's an updated version since Eli separately pushed the fix to the defcustom. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-null-values-of-elisp-flymake-byte-compile-execut.patch >From b8028967538aec545b6082bb295229b142490710 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 4 Sep 2025 10:36:17 -0400 Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executable * lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile-executable): Improve defcustom type. (elisp-flymake-byte-compile--executable): Properly check for nil. (bug#79380) --- lisp/progmodes/elisp-mode.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index aebc93d1ddb..df9af7d83bd 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2303,13 +2303,16 @@ elisp-flymake-byte-compile--executable "Return absolute file name of the Emacs executable for flymake byte-compilation." (let ((filename (cond - ((file-name-absolute-p elisp-flymake-byte-compile-executable) - elisp-flymake-byte-compile-executable) + ((null elisp-flymake-byte-compile-executable) nil) ((stringp elisp-flymake-byte-compile-executable) - (when-let* ((pr (project-current))) - (file-name-concat (project-root pr) - elisp-flymake-byte-compile-executable)))))) - (if (file-executable-p filename) + (if (file-name-absolute-p elisp-flymake-byte-compile-executable) + elisp-flymake-byte-compile-executable + (when-let* ((pr (project-current))) + (file-name-concat (project-root pr) + elisp-flymake-byte-compile-executable)))) + (t (error "Invalid `elisp-flymake-byte-compile-executable': %s" + elisp-flymake-byte-compile-executable))))) + (if (and filename (file-executable-p filename)) filename (when elisp-flymake-byte-compile-executable (message "No such `elisp-flymake-byte-compile-executable': %s" -- 2.43.7 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 03:00:12 2025 Received: (at 79380) by debbugs.gnu.org; 6 Sep 2025 07:00:12 +0000 Received: from localhost ([127.0.0.1]:33083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uumu8-0007aQ-5o for submit@debbugs.gnu.org; Sat, 06 Sep 2025 03:00:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57984) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uumtv-0007X8-CV for 79380@debbugs.gnu.org; Sat, 06 Sep 2025 03:00:00 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uumtn-0001uM-9W; Sat, 06 Sep 2025 02:59:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vysKaOelUDq12lakQkIG/DcoSxRpEVHGPGtVA8m1tA8=; b=cy3vkksUFwuf GZVnWnAs4/LPbJyJsN7ZiJvrm17PWttMbDbGdnpunX/lutrTdYsFVa0ay+eHLjiST8axB6HKcR5U7 TQx7K1lEq2oTQMtTlsXCDwvMQVHU4bQAIm9nKCJRIS00EBN+lAYahKEHQZpF4wARCaX1b7WfQQ2ph 6UsBV+Zk2QnKLsrmi40Jlpc76EljYl2q6aH3PmTpoeKvw01Tg/P0PXvdtnCbYIgsWbJN9QA9SHc0L KgkIIRvBRFig3qMIb6yG2EBPuMbBBm/bHsYi7REDrVkH/O435yWqCNmYWcQxHhnOegfYJO4mxCEIV fzhrehgncEt9XHcGrvzllw==; Date: Sat, 06 Sep 2025 09:59:43 +0300 Message-Id: <86zfb8gj6o.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 05 Sep 2025 14:26:49 -0400) Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore, [PATCH] Fix null values of elisp-flymake-byte-compile-executable References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: 79380@debbugs.gnu.org, Eli Zaretskii > 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. > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 06:09:02 2025 Received: (at 79380) by debbugs.gnu.org; 6 Sep 2025 10:09:02 +0000 Received: from localhost ([127.0.0.1]:34555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uupqv-0002lW-O1 for submit@debbugs.gnu.org; Sat, 06 Sep 2025 06:09:02 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:38591 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uupqq-0002l5-Sf for 79380@debbugs.gnu.org; Sat, 06 Sep 2025 06:08:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=OHs7wGes7SGNIUCcPPhVvRE9HrKtETnQ5urd6AFB6b4=; b=WLif8BrfZOu01piwKcgiJRMs2A /K3/+fGpUuVGwflE+5DKkdwrmTcwxHIsJy2h/oWgueWPos1xyLG/iJ6p8Qbzs6LjXmxffTiXVhVAx v00vQ+MBYJNtEghyFUCix/2lPvf53ta6FvNWIX+RaBMphc7Rm0QvS7FkwE5C+Ec8cK0U=; From: Daniel Mendler To: Eli Zaretskii Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore, [PATCH] Fix null values of elisp-flymake-byte-compile-executable In-Reply-To: <86zfb8gj6o.fsf@gnu.org> References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> <86zfb8gj6o.fsf@gnu.org> Date: Sat, 06 Sep 2025 12:08:46 +0200 Message-ID: <87ldmryjtd.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii writes: >> From: Spencer Baugh >> Cc: 79380@debbugs.gnu.org, Eli Zaretskii >> 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 11:14:34 2025 Received: (at 79380) by debbugs.gnu.org; 6 Sep 2025 15:14:34 +0000 Received: from localhost ([127.0.0.1]:37013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuucc-0005fG-59 for submit@debbugs.gnu.org; Sat, 06 Sep 2025 11:14:34 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:45835) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuucY-0005ew-9F for 79380@debbugs.gnu.org; Sat, 06 Sep 2025 11:14:31 -0400 From: Spencer Baugh To: Daniel Mendler Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore, [PATCH] Fix null values of elisp-flymake-byte-compile-executable In-Reply-To: <87ldmryjtd.fsf@daniel-mendler.de> (Daniel Mendler's message of "Sat, 06 Sep 2025 12:08:46 +0200") References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> <86zfb8gj6o.fsf@gnu.org> <87ldmryjtd.fsf@daniel-mendler.de> Date: Sat, 06 Sep 2025 11:14:24 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1757171664; bh=VGBPVDXVUIdbeoC/KtDoLSL1eqWJugYb+bXANSFDUbU=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ujo9a3KpQaEqxd3cQxmE7zib1YPIeM3sPB+JoiKyqVmxtiaAy1OKu8elqC8z4c5rv FOrfzEoNl3vlQzYpOS4DYcid32aZWDFAybW/R0LjMzmWqYsQ8kXCmHZGC77CHTzAPs /E/3lyL4FV3tHcwKKfD4xb4ZZwKyaRlyR1YAWoIfeFmRhZSu+B3WPVX51QYbgmjvhJ PaxYVWQTwV11OeKxTKHblNSdZNErPOg7TzosOZ9I22IH5ioiFBobl0Vw8mbs8sKq+f Hq12/lkW4HAZbY810aO8g/QZSz6lUuqK0G/kseTreKvYk+9jqFFAVauYRPej+H33+H 2uQFq76eCRPQQ== X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380 Cc: 79380@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Daniel Mendler writes: > Eli Zaretskii writes: > >>> From: Spencer Baugh >>> Cc: 79380@debbugs.gnu.org, Eli Zaretskii >>> 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? That was deliberate, yes. If a user sets elisp-flymake-byte-compile-executable to "src/emacs" in dir-locals in the Emacs repo, but they haven't compiled Emacs yet, I figure they would prefer that flymake fall back to using their running Emacs instance rather than error because repo/src/emacs doesn't exist. That being said, since this is unclear I think the message for that case could be improved. Also, some of the nested conditionals indeed can be removed. Hence, this patch, which I think seems good to me. (We don't need to check file-executable-p in the absolute file name case, where we don't need to fall back; start-process will just error, just like it would if (expand-file-name invocation-name invocation-directory) doesn't exist anymore) >> Thanks. However, the log message still says the defcustom is being >> modified, which the patch doesn't do. Fixed, thanks. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-null-values-of-elisp-flymake-byte-compile-execut.patch >From 8684d0e973a788165d8c7f521703413b5d1e937f Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 4 Sep 2025 10:36:17 -0400 Subject: [PATCH] Fix null values of elisp-flymake-byte-compile-executable * lisp/progmodes/elisp-mode.el (elisp-flymake-byte-compile--executable): Properly check for nil, and simplify code. (bug#79380) --- lisp/progmodes/elisp-mode.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index aebc93d1ddb..42653069feb 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2301,20 +2301,23 @@ elisp-flymake-byte-compile-executable (declare-function project-root "project" (project)) (defun elisp-flymake-byte-compile--executable () "Return absolute file name of the Emacs executable for flymake byte-compilation." - (let ((filename - (cond - ((file-name-absolute-p elisp-flymake-byte-compile-executable) - elisp-flymake-byte-compile-executable) - ((stringp elisp-flymake-byte-compile-executable) - (when-let* ((pr (project-current))) - (file-name-concat (project-root pr) - elisp-flymake-byte-compile-executable)))))) - (if (file-executable-p filename) - filename - (when elisp-flymake-byte-compile-executable - (message "No such `elisp-flymake-byte-compile-executable': %s" - filename)) - (expand-file-name invocation-name invocation-directory)))) + (cond + ((null elisp-flymake-byte-compile-executable) + (expand-file-name invocation-name invocation-directory)) + ((not (stringp elisp-flymake-byte-compile-executable)) + (error "Invalid `elisp-flymake-byte-compile-executable': %s" + elisp-flymake-byte-compile-executable)) + ((file-name-absolute-p elisp-flymake-byte-compile-executable) + elisp-flymake-byte-compile-executable) + (t ; relative file name + (let ((filename (file-name-concat (project-root (project-current)) + elisp-flymake-byte-compile-executable))) + (if (file-executable-p filename) + filename + ;; The user might not have built Emacs yet, so just fall back. + (message "`elisp-flymake-byte-compile-executable' (%s) doesn't exist" + elisp-flymake-byte-compile-executable) + (expand-file-name invocation-name invocation-directory)))))) ;;;###autoload (defun elisp-flymake-byte-compile (report-fn &rest _args) -- 2.43.7 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 06 11:35:05 2025 Received: (at 79380-done) by debbugs.gnu.org; 6 Sep 2025 15:35:05 +0000 Received: from localhost ([127.0.0.1]:37083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uuuwT-0006fo-9o for submit@debbugs.gnu.org; Sat, 06 Sep 2025 11:35:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51248) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uuuwP-0006f4-Eb for 79380-done@debbugs.gnu.org; Sat, 06 Sep 2025 11:35:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uuuwG-0007za-NC; Sat, 06 Sep 2025 11:34:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=46sDgvFNhS19qqZ8TJ6u8ItZbGTx/sEDrnJAvsx1PzA=; b=VJEAa4LW3nHk KE2kYIWstpoivY7f8Eg/fj/uTHULleO8LvY355PNU7XGGfIEi4wI6UfC/9DXYy90cU4MFxUGyEKsq ou/wYV6Egt3F7vCWYunaibiZviyr9y70CD7o9O+tekBDahKly+OzgZLigRx5Ru3j6hLRvchfKvVu9 13uTi0ckGOQrogCVfnNB2uhuejQSmIFl6gCdWQYYRP49n+tOwBSiK6hHrZAL95kgKY2Y+GFOQwG4/ 0CRuNkBFsIkrN244DONrJmK+s4aayCwPXOcy5vVyK332G+OmkA/0QcZ7psqE+WSruKtP+vfiVwN2N N0L5DLNoF6cITr0A+78Kkg==; Date: Sat, 06 Sep 2025 18:34:48 +0300 Message-Id: <864itffvc7.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Sat, 06 Sep 2025 11:14:24 -0400) Subject: Re: bug#79380: 31.0.50; Flymake does not check Elisp code anymore, [PATCH] Fix null values of elisp-flymake-byte-compile-executable References: <87o6rr1aya.fsf@daniel-mendler.de> <863492jkpz.fsf@gnu.org> <861pomjjd5.fsf@gnu.org> <87bjnqjidz.fsf@daniel-mendler.de> <86zfb8gj6o.fsf@gnu.org> <87ldmryjtd.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79380-done Cc: 79380-done@debbugs.gnu.org, mail@daniel-mendler.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: Eli Zaretskii , 79380@debbugs.gnu.org > Date: Sat, 06 Sep 2025 11:14:24 -0400 > > Daniel Mendler writes: > > > Eli Zaretskii writes: > > > >>> From: Spencer Baugh > >>> Cc: 79380@debbugs.gnu.org, Eli Zaretskii > >>> 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? > > That was deliberate, yes. If a user sets > elisp-flymake-byte-compile-executable to "src/emacs" in dir-locals in > the Emacs repo, but they haven't compiled Emacs yet, I figure they would > prefer that flymake fall back to using their running Emacs instance > rather than error because repo/src/emacs doesn't exist. > > That being said, since this is unclear I think the message for that case > could be improved. Also, some of the nested conditionals indeed can be > removed. Hence, this patch, which I think seems good to me. (We don't > need to check file-executable-p in the absolute file name case, where we > don't need to fall back; start-process will just error, just like it > would if (expand-file-name invocation-name invocation-directory) doesn't > exist anymore) > > >> Thanks. However, the log message still says the defcustom is being > >> modified, which the patch doesn't do. > > Fixed, thanks. Thanks, installed, and closing the bug.