bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22046: [PATCH] Improve version-to-list parsing


From: Alex Dunn
Subject: bug#22046: [PATCH] Improve version-to-list parsing
Date: Tue, 01 Dec 2015 20:14:29 -0800
User-agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.50.1 (x86_64-apple-darwin15.0.0)

OK, that’s fair.  Attaching a new patch and changelog.

Thanks!

2015-12-01  Alex Dunn  <dunn.alex@gmail.com>

        Improve version-to-list parsing

        * lisp/subr.el (version-regexp-alist): allow "." as priority separator
        * lisp/subr.el (version-to-list): more helpful error messages
        * lisp/subr.el (version-to-list): ".5" is valid (update docstring)
        * lisp/subr.el (version-to-list): make "22.8X3" invalid
        * test/lisp/subr-tests.el (ert-test-version-parsing): parsing tests

Attachment: 0001-Improve-version-to-list-parsing.patch
Description: Text Data

Eli Zaretskii <eliz@gnu.org> writes:

> Sounds to me as a MELPA-specific problem that should be solved there,
> not in Emacs.
>
>> But it’s true that with this change some very long strings will be
>> parsed as valid.  This returns '(0 9), which is sort of ridiculous:
>> 
>> (version-to-list "It’s true that with this change some very long strings 
>> will be parsed as valid: 0.9")
>> 
>> But I guess I’m not sure what the danger is in letting that happen.  Is
>> version-to-list often used to parse arbitrary strings, where false
>> positives would cause problems?
>
> I just don't see a reason for such a radical change in behavior of a
> feature that has been very stable lately.
>
> Thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]