GNU bug report logs - #79870
lisp/registry.el: ";; version: a float" triggers (lm-get-header-re "version").

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Alan Mackenzie <acm@HIDDEN>; dated Thu, 20 Nov 2025 12:01:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 79870 <at> debbugs.gnu.org:


Received: (at 79870) by debbugs.gnu.org; 7 Dec 2025 12:24:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 07 07:24:25 2025
Received: from localhost ([127.0.0.1]:38206 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vSDoP-0002Av-HZ
	for submit <at> debbugs.gnu.org; Sun, 07 Dec 2025 07:24:25 -0500
Received: from mail.muc.de ([193.149.48.3]:42703)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1vSDoM-0002Ac-4U
 for 79870 <at> debbugs.gnu.org; Sun, 07 Dec 2025 07:24:23 -0500
Received: (qmail 29826 invoked by uid 3782); 7 Dec 2025 13:24:14 +0100
Received: from muc.de (p4fe1500c.dip0.t-ipconnect.de [79.225.80.12]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Sun, 07 Dec 2025 13:24:14 +0100
Received: (qmail 29382 invoked by uid 1000); 7 Dec 2025 12:24:13 -0000
Date: Sun, 7 Dec 2025 12:24:13 +0000
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#79870: lisp/registry.el: ";; version: a float" triggers
 (lm-get-header-re "version").
Message-ID: <aTVx7ev7R5Dj-wZu@HIDDEN>
References: <aR8Cvsp9t9naFRq9@HIDDEN>
 <jwv7bvifdwr.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <jwv7bvifdwr.fsf-monnier+emacs@HIDDEN>
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 79870
Cc: acm@HIDDEN, 79870 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello, Stefan.

On Sat, Nov 22, 2025 at 07:38:03 -0500, Stefan Monnier wrote:
> > Error: error ("Invalid version syntax: ‘a float’ (must start with a number)")
> >   signal(error ("Invalid version syntax: ‘a float’ (must start with a number)"))
> >   error("Invalid version syntax: `%s' (must start with a number)" "a float")
> >   (if (string-match-p "^[0-9]" ver) nil (error "Invalid version syntax: `%s' (must start with a number)" ver))
> >   (unless (string-match-p "^[0-9]" ver) (error "Invalid version syntax: `%s' (must start with a number)" ver))
> >   version-to-list("a float")
> >   loaddefs-generate--parse-file("/home/acm/emacs/emacs.git/sub-master-b/lisp/registry.el" "/home/acm/emacs/emacs.git/sub-master-b/lisp/loaddefs.el" t)

> Hmmm....

> > The cause of this is the line in registry.el:

> >     ;; version: a float

> 🙁

> > I propose the following patch which will prevent this sort of thing
> > happening again:



> > diff --git a/lisp/registry.el b/lisp/registry.el
> > index 3b489ea88b7..07bbe179959 100644
> > --- a/lisp/registry.el
> > +++ b/lisp/registry.el
> > @@ -25,24 +25,24 @@
> >  ;; This library provides a general-purpose EIEIO-based registry
> >  ;; database with persistence, initialized with these fields:

> > -;; version: a float
> > +;; version - a float

> Fine by me.  A good alternative would be:

>     ;; `version': a float

> But I wonder how you got that backtrace.  The code I see in
> `loaddefs-gen.el` is:

>         (let ((version (lm-header "version"))
>               package)
>           (when (and version
>                      (setq version (ignore-errors (version-to-list version)))
>             [...]

> so AFAICT all errors should be harshly silenced by `ignore-errors`,
> preventing the backtrace you saw.  What am I missing?

I don't know, but I'm missing it too.  The development version of the
source it occurred in is not buildable at the moment, so I can't test
anything.  I remember searching for the cause two weeks ago and not
finding it.  But that ignore-errors should indeed have prevented the
error from throwing a backtrace.

But I'll commit my patch anyway, since it is otherwise harmless.

>         Stefan

-- 
Alan Mackenzie (Nuremberg, Germany).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79870; Package emacs. Full text available.

Message received at 79870 <at> debbugs.gnu.org:


Received: (at 79870) by debbugs.gnu.org; 6 Dec 2025 10:37:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 06 05:37:13 2025
Received: from localhost ([127.0.0.1]:58165 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vRpf7-0006br-7q
	for submit <at> debbugs.gnu.org; Sat, 06 Dec 2025 05:37:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:60510)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vRpf5-0006bc-VN
 for 79870 <at> debbugs.gnu.org; Sat, 06 Dec 2025 05:37:12 -0500
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 <eliz@HIDDEN>)
 id 1vRpf0-0002Gt-5B; Sat, 06 Dec 2025 05:37:06 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=OXS1/SPdtWGusRrAMAFRyCF3+unoUOAXQv5vahQKarE=; b=mexSHsYZrI/euSqjSwoL
 2eBvEa/WjqBS7qDsnVFzj2b2y9NbSGEixZotYbdybcyWxk9MOxEDGnP+M5+HNk/WFelte3O1B2YVe
 Htru1R6HbNPW0LIkC2M1Lenxf1eRrI6wFqqJIzU0BH3MjT+I3QPiVWtqg3xqTUrAxZkJ9AiRDShZO
 CUotJP478F1uc5JgtNF0JOfOXmC99txhUsKRseQ9F12+b5N8Ri/Rt5UgvSNOeK4iBXNEjsd+XC3Xq
 3RC58Xg5iYP/VCAcP/tBni2gO5ntg5Yo/lqEqVF8Ly8lGe/05eRxGxBDyoeAU9uLnBbT7z3bR3H2U
 5qE4dIhi7XTOag==;
Date: Sat, 06 Dec 2025 12:37:03 +0200
Message-Id: <865xajyjzk.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: acm@HIDDEN, Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwv7bvifdwr.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#79870: lisp/registry.el: "; ;
 version: a float" triggers (lm-get-header-re "version").
References: <aR8Cvsp9t9naFRq9@HIDDEN>
 <jwv7bvifdwr.fsf-monnier+emacs@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79870
Cc: 79870 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ping!  Alan, would you please answer Stefan's question, and also
install your patch?

> Cc: 79870 <at> debbugs.gnu.org
> Date: Sat, 22 Nov 2025 07:38:03 -0500
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> > Error: error ("Invalid version syntax: ‘a float’ (must start with a number)")
> >   signal(error ("Invalid version syntax: ‘a float’ (must start with a number)"))
> >   error("Invalid version syntax: `%s' (must start with a number)" "a float")
> >   (if (string-match-p "^[0-9]" ver) nil (error "Invalid version syntax: `%s' (must start with a number)" ver))
> >   (unless (string-match-p "^[0-9]" ver) (error "Invalid version syntax: `%s' (must start with a number)" ver))
> >   version-to-list("a float")
> >   loaddefs-generate--parse-file("/home/acm/emacs/emacs.git/sub-master-b/lisp/registry.el" "/home/acm/emacs/emacs.git/sub-master-b/lisp/loaddefs.el" t)
> 
> Hmmm....
> 
> > The cause of this is the line in registry.el:
> >
> >     ;; version: a float
> 
> 🙁
> 
> > I propose the following patch which will prevent this sort of thing
> > happening again:
> >
> >
> >
> > diff --git a/lisp/registry.el b/lisp/registry.el
> > index 3b489ea88b7..07bbe179959 100644
> > --- a/lisp/registry.el
> > +++ b/lisp/registry.el
> > @@ -25,24 +25,24 @@
> >  ;; This library provides a general-purpose EIEIO-based registry
> >  ;; database with persistence, initialized with these fields:
> >  
> > -;; version: a float
> > +;; version - a float
> 
> Fine by me.  A good alternative would be:
> 
>     ;; `version': a float
> 
> But I wonder how you got that backtrace.  The code I see in
> `loaddefs-gen.el` is:
> 
>         (let ((version (lm-header "version"))
>               package)
>           (when (and version
>                      (setq version (ignore-errors (version-to-list version)))
>             [...]
> 
> so AFAICT all errors should be harshly silenced by `ignore-errors`,
> preventing the backtrace you saw.  What am I missing?
> 
> 
>         Stefan
> 
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79870; Package emacs. Full text available.

Message received at 79870 <at> debbugs.gnu.org:


Received: (at 79870) by debbugs.gnu.org; 25 Nov 2025 20:36:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:36:23 2025
Received: from localhost ([127.0.0.1]:42694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzlu-000656-LX
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:36:23 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:45768)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vMlXo-0000ri-Es
 for 79870 <at> debbugs.gnu.org; Sat, 22 Nov 2025 06:12:45 -0500
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 <eliz@HIDDEN>)
 id 1vMlXY-0000GH-LN; Sat, 22 Nov 2025 06:12:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=wpfiqOXZRepLYYfh89uKCwCY/aYU6kdCcJvqWW3aoM4=; b=lAovTK+U/3ubX9PSQLG2
 8SWXlRIsjN7PINdNyxO2u/pNhef5M39Xr/EvH6EUsp7qZVrgH3JgcSC+2c2i9bGlRSZmfyFYKdFyy
 j26v+KcPKded8icbUd+qaXzL6ljtzDJHIfqfgQ5Sem9bEhHKg7A/9CmeRrvR0PdfxZ/8Wh5hMnKWd
 0BOjAtD2PuqF9/4OHsUWZkFSBLWdK1jPiYpQ9c0c78XSDSGm8DsF2Cn03V+u0pE7v4YqxHmOYMOjr
 Ug38Dvu++Q44ZmbgUmvsmUJ9OP/IY2nAjo3flRYWfdw8TszFW2NprNDi2RPPMVbRbVXUidekezVZK
 lnM8rkWSg65cMQ==;
Date: Sat, 22 Nov 2025 13:12:19 +0200
Message-Id: <86bjkufhik.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <aR8Cvsp9t9naFRq9@HIDDEN> (message from Alan Mackenzie on
 Thu, 20 Nov 2025 11:59:58 +0000)
Subject: Re: bug#79870: lisp/registry.el: "; ;
 version: a float" triggers (lm-get-header-re "version").
References: <aR8Cvsp9t9naFRq9@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79870
Cc: 79870 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Thu, 20 Nov 2025 11:59:58 +0000
> From: Alan Mackenzie <acm@HIDDEN>
> 
> In my development version branched off of an up to date master (but not
> in master itself, for reasons I don't understand):
> 
> (i) With no .elc files, no src/emacs and no src/bootstrap-emacs in the
>   build tree:
> (ii) Do what is needed to generate backtraces on build errors.
> (iii) make
> 
> This generates the following backtrace:
> 
> Error: error ("Invalid version syntax: ‘a float’ (must start with a number)")
>   signal(error ("Invalid version syntax: ‘a float’ (must start with a number)"))
>   error("Invalid version syntax: `%s' (must start with a number)" "a float")
>   (if (string-match-p "^[0-9]" ver) nil (error "Invalid version syntax: `%s' (must start with a number)" ver))
>   (unless (string-match-p "^[0-9]" ver) (error "Invalid version syntax: `%s' (must start with a number)" ver))
>   version-to-list("a float")
>   loaddefs-generate--parse-file("/home/acm/emacs/emacs.git/sub-master-b/lisp/registry.el" "/home/acm/emacs/emacs.git/sub-master-b/lisp/loaddefs.el" t)
> 
> ..
> 
> The cause of this is the line in registry.el:
> 
>     ;; version: a float
> 
> , which loaddefs-generate--parse-file is trying to interpret as a line
> specifying the version number.
> 
> I propose the following patch which will prevent this sort of thing
> happening again:

I think this change is okay.  Stefan, WDYT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79870; Package emacs. Full text available.

Message received at 79870 <at> debbugs.gnu.org:


Received: (at 79870) by debbugs.gnu.org; 25 Nov 2025 20:21:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 25 15:21:18 2025
Received: from localhost ([127.0.0.1]:41782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vNzXK-0000sb-Cz
	for submit <at> debbugs.gnu.org; Tue, 25 Nov 2025 15:21:18 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47285)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1vMmsc-0008Fl-Eg
 for 79870 <at> debbugs.gnu.org; Sat, 22 Nov 2025 07:38:19 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B3D1B819C0;
 Sat, 22 Nov 2025 07:38:08 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1763815087;
 bh=Q4eLWh3srJ6uZW5MX6GiGuX3ehvznM5PzubZeakWLII=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=UUnknocH2FB8c7lUDMIdp1EU45dAcOFN7ZbSOSNLftM+Gox8tj/9wqmy/TP5NmuuJ
 0bH1fhX97J7q2JLF3r2SAUwFt8OB0aFT/oAvDqIJ429tuUC/F1b+r0q6DAp+7QWoqK
 JZbTHXnKTHAHlK1uc0DHS0poYF/CKc9gigmjZkZ645PXYZ7SOVqmLQOcZuK5eUYwyt
 xsodW/NdfpBTW/SFcgWrPtG2AN6omAaHrEfbufGnehu6LtAreAvzbOwe4JSoKwCMrN
 LuU9/0FYyaGUYOw8de/IzYPlwtLpSq/ilufExVDOfzeGODQQMPGywhL/Vt553ypNUD
 OghMCYUJYVgOw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A57B5807AA;
 Sat, 22 Nov 2025 07:38:07 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 656501207DA;
 Sat, 22 Nov 2025 07:38:06 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Alan Mackenzie <acm@HIDDEN>
Subject: Re: bug#79870: lisp/registry.el: ";; version: a float" triggers
 (lm-get-header-re "version").
In-Reply-To: <aR8Cvsp9t9naFRq9@HIDDEN>
Message-ID: <jwv7bvifdwr.fsf-monnier+emacs@HIDDEN>
References: <aR8Cvsp9t9naFRq9@HIDDEN>
Date: Sat, 22 Nov 2025 07:38:03 -0500
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-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.252 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79870
Cc: 79870 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Error: error ("Invalid version syntax: =E2=80=98a float=E2=80=99 (must st=
art with a number)")
>   signal(error ("Invalid version syntax: =E2=80=98a float=E2=80=99 (must =
start with a number)"))
>   error("Invalid version syntax: `%s' (must start with a number)" "a floa=
t")
>   (if (string-match-p "^[0-9]" ver) nil (error "Invalid version syntax: `=
%s' (must start with a number)" ver))
>   (unless (string-match-p "^[0-9]" ver) (error "Invalid version syntax: `=
%s' (must start with a number)" ver))
>   version-to-list("a float")
>   loaddefs-generate--parse-file("/home/acm/emacs/emacs.git/sub-master-b/l=
isp/registry.el" "/home/acm/emacs/emacs.git/sub-master-b/lisp/loaddefs.el" =
t)

Hmmm....

> The cause of this is the line in registry.el:
>
>     ;; version: a float

=F0=9F=99=81

> I propose the following patch which will prevent this sort of thing
> happening again:
>
>
>
> diff --git a/lisp/registry.el b/lisp/registry.el
> index 3b489ea88b7..07bbe179959 100644
> --- a/lisp/registry.el
> +++ b/lisp/registry.el
> @@ -25,24 +25,24 @@
>  ;; This library provides a general-purpose EIEIO-based registry
>  ;; database with persistence, initialized with these fields:
>=20=20
> -;; version: a float
> +;; version - a float

Fine by me.  A good alternative would be:

    ;; `version': a float

But I wonder how you got that backtrace.  The code I see in
`loaddefs-gen.el` is:

        (let ((version (lm-header "version"))
              package)
          (when (and version
                     (setq version (ignore-errors (version-to-list version)=
))
            [...]

so AFAICT all errors should be harshly silenced by `ignore-errors`,
preventing the backtrace you saw.  What am I missing?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#79870; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Nov 2025 12:00:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 20 07:00:14 2025
Received: from localhost ([127.0.0.1]:46872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vM3Kg-0006Nf-DY
	for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 07:00:14 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38082)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1vM3Kd-0006Ia-UC
 for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 07:00:12 -0500
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 <acm@HIDDEN>) id 1vM3KW-0006im-A0
 for bug-gnu-emacs@HIDDEN; Thu, 20 Nov 2025 07:00:04 -0500
Received: from mail.muc.de ([193.149.48.3])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <acm@HIDDEN>) id 1vM3KU-0003aO-2W
 for bug-gnu-emacs@HIDDEN; Thu, 20 Nov 2025 07:00:03 -0500
Received: (qmail 45854 invoked by uid 3782); 20 Nov 2025 12:59:59 +0100
Received: from muc.de (pd953aeb9.dip0.t-ipconnect.de [217.83.174.185]) (using
 STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP;
 Thu, 20 Nov 2025 12:59:59 +0100
Received: (qmail 15912 invoked by uid 1000); 20 Nov 2025 11:59:58 -0000
Date: Thu, 20 Nov 2025 11:59:58 +0000
To: bug-gnu-emacs@HIDDEN
Subject: lisp/registry.el: ";; version: a float" triggers (lm-get-header-re
 "version").
Message-ID: <aR8Cvsp9t9naFRq9@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Submission-Agent: TMDA/1.3.x (Ph3nix)
From: Alan Mackenzie <acm@HIDDEN>
X-Primary-Address: acm@HIDDEN
Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@HIDDEN;
 helo=mail.muc.de
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 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
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

Hello, Emacs.

In my development version branched off of an up to date master (but not
in master itself, for reasons I don't understand):

(i) With no .elc files, no src/emacs and no src/bootstrap-emacs in the
  build tree:
(ii) Do what is needed to generate backtraces on build errors.
(iii) make

This generates the following backtrace:

Error: error ("Invalid version syntax: ‘a float’ (must start with a number)")
  signal(error ("Invalid version syntax: ‘a float’ (must start with a number)"))
  error("Invalid version syntax: `%s' (must start with a number)" "a float")
  (if (string-match-p "^[0-9]" ver) nil (error "Invalid version syntax: `%s' (must start with a number)" ver))
  (unless (string-match-p "^[0-9]" ver) (error "Invalid version syntax: `%s' (must start with a number)" ver))
  version-to-list("a float")
  loaddefs-generate--parse-file("/home/acm/emacs/emacs.git/sub-master-b/lisp/registry.el" "/home/acm/emacs/emacs.git/sub-master-b/lisp/loaddefs.el" t)

..

The cause of this is the line in registry.el:

    ;; version: a float

, which loaddefs-generate--parse-file is trying to interpret as a line
specifying the version number.

I propose the following patch which will prevent this sort of thing
happening again:



diff --git a/lisp/registry.el b/lisp/registry.el
index 3b489ea88b7..07bbe179959 100644
--- a/lisp/registry.el
+++ b/lisp/registry.el
@@ -25,24 +25,24 @@
 ;; This library provides a general-purpose EIEIO-based registry
 ;; database with persistence, initialized with these fields:
 
-;; version: a float
+;; version - a float
 
-;; max-size: an integer, default most-positive-fixnum
+;; max-size - an integer, default most-positive-fixnum
 
-;; prune-factor: a float between 0 and 1, default 0.1
+;; prune-factor - a float between 0 and 1, default 0.1
 
-;; precious: a list of symbols
+;; precious - a list of symbols
 
-;; tracked: a list of symbols
+;; tracked - a list of symbols
 
-;; tracker: a hash table tuned for 100 symbols to track (you should
+;; tracker - a hash table tuned for 100 symbols to track (you should
 ;; only access this with the :lookup2-function and the
 ;; :lookup2+-function)
 
-;; data: a hash table with default size 10K and resize threshold 2.0
+;; data - a hash table with default size 10K and resize threshold 2.0
 ;; (this reflects the expected usage so override it if you know better)
 
-;; ...plus methods to do all the work: `registry-search',
+;; ...plus methods to do all the work - `registry-search',
 ;; `registry-lookup', `registry-lookup-secondary',
 ;; `registry-lookup-secondary-value', `registry-insert',
 ;; `registry-delete', `registry-prune', `registry-size' which see


-- 
Alan Mackenzie (Nuremberg, Germany).




Acknowledgement sent to Alan Mackenzie <acm@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#79870; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 7 Dec 2025 12:30:02 UTC

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