From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.bugs Subject: bug#48404: 28.0.50; "Invalid version syntax" errors with read-extended-command Date: Fri, 14 May 2021 08:47:32 +0200 Message-ID: <871ra9kdgs.fsf@gnu.org> References: <875yzms6im.fsf@gnu.org> <83wns1zvhs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39476"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.5.13; emacs 28.0.50 Cc: 48404@debbugs.gnu.org, stefan@marxist.se To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 14 09:00:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lhRnz-000A5O-NQ for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 09:00:15 +0200 Original-Received: from localhost ([::1]:36120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhRnx-0002Un-P1 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 May 2021 03:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhRnm-0002UQ-BM for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 03:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhRnm-0003Sd-33 for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 03:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lhRnm-0006a9-0c for bug-gnu-emacs@gnu.org; Fri, 14 May 2021 03:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tassilo Horn Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 May 2021 07:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48404 X-GNU-PR-Package: emacs Original-Received: via spool by 48404-submit@debbugs.gnu.org id=B48404.162097558325248 (code B ref 48404); Fri, 14 May 2021 07:00:01 +0000 Original-Received: (at 48404) by debbugs.gnu.org; 14 May 2021 06:59:43 +0000 Original-Received: from localhost ([127.0.0.1]:44793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRnT-0006ZA-EK for submit@debbugs.gnu.org; Fri, 14 May 2021 02:59:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lhRnR-0006Yx-AP for 48404@debbugs.gnu.org; Fri, 14 May 2021 02:59:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44642) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhRnL-0003BJ-Sw; Fri, 14 May 2021 02:59:35 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:36075) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhRnL-0004um-7b; Fri, 14 May 2021 02:59:35 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailauth.nyi.internal (Postfix) with ESMTP id E332227C0054; Fri, 14 May 2021 02:59:34 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 14 May 2021 02:59:34 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdehhedgudduvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvffuffgjkfggtgfgsehtqhertddtreejnecuhfhrohhmpefvrghs shhilhhoucfjohhrnhcuoehtshguhhesghhnuhdrohhrgheqnecuggftrfgrthhtvghrnh epiedugffhhfejveevvdfhffegteelleejffefgefgueeggeelheefieeujefhheegnecu kfhppeekjedrudeifedrfedurdduheegnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhn rghlihhthidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrgh esfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: from thinkpad-t440p (p57a31f9a.dip0.t-ipconnect.de [87.163.31.154]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 May 2021 02:59:34 -0400 (EDT) In-reply-to: <83wns1zvhs.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:206482 Archived-At: Eli Zaretskii writes: >> For example, M-x mag TAB gives >>=20 >> completion--some: Invalid version syntax: =E2=80=98Magit 3.0.0=E2=80= =99 (must start with a number) > > That commit uses byte-obsolete-info property of a symbol, and expects > its caddr to be a valid version number. It sounds like in some cases > it is not an Emacs version, but something else. So, questions: > > . can you find out what kind of value does the byte-obsolete-info > property is there on Magit functions? and It's not just Magit. I've grepped my ~/.emacs.d/elpa/ and here are some values: (make-obsolete-variable 'magit-refresh-args nil "Magit 3.0.0") (make-obsolete-variable backported sym "yasnippet 0.8") (make-obsolete-variable 'which-key-key-replacement-alist 'which-key-replacement-alist "2016-11-21") So at least magit and yasnippet use " " syntax here, and which-key uses a date (which seems fine for version-to-list). > . how come these properties were added to something that is not an > Emacs core code? It seems to be added by `make-obsolete', no? Otherwise, there is no writing menion of byte-obsolete-info. > In any case, it sounds like blindly trusting the value of that > property is not a good idea, and we should wrap the call to > version-to-list there in condition-case. Could you try that? I've tried this --8<---------------cut here---------------start------------->8--- diff --git a/lisp/simple.el b/lisp/simple.el index 0255f69e42..573e344fea 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2020,8 +2020,10 @@ read-extended-command ;; Has a current-name. (functionp (car obsolete)) ;; when >=3D emacs-major-version - (>=3D (car (version-to-list (caddr obs= olete))) - emacs-major-version)))))) + (condition-case nil + (>=3D (car (version-to-list (caddr= obsolete))) + emacs-major-version) + (t nil))))))) pred))) (complete-with-action action obarray string pred)))) --8<---------------cut here---------------end--------------->8--- which does the trick. Should I write bug reports for Magit and Yasnippets so that they should only specify the version number in `make-obsolete' / `make-obsolete-variable'? Or should emacs support the " " syntax? Bye, Tassilo