GNU bug report logs - #24944
[PATCH] Skip test-seq-random-elt-take-all on Emacs 24

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Tue, 15 Nov 2016 05:34:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Petton <nicolas <at> petton.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24944 in the body.
You can then email your comments to 24944 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 05:34:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sean Whitton <spwhitton <at> spwhitton.name>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 15 Nov 2016 05:34:02 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Cc: Sean Whitton <spwhitton <at> spwhitton.name>
Subject: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Mon, 14 Nov 2016 21:00:50 -0700
The function `map-length' is not available.
---
 packages/seq/tests/seq-tests.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/packages/seq/tests/seq-tests.el b/packages/seq/tests/seq-tests.el
index 53930fa..7a9a452 100644
--- a/packages/seq/tests/seq-tests.el
+++ b/packages/seq/tests/seq-tests.el
@@ -351,6 +351,7 @@ Evaluate BODY for each created sequence.
                    ["xxx" "xx" "x"]))))
 
 (ert-deftest test-seq-random-elt-take-all ()
+  (skip-unless (version> emacs-version "25"))
   (let ((seq '(a b c d e))
         (count '()))
     (should (= 0 (map-length count)))
-- 
2.10.2





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 15:21:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 24944 <at> debbugs.gnu.org
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 17:20:36 +0200
> From: Sean Whitton <spwhitton <at> spwhitton.name>
> Date: Mon, 14 Nov 2016 21:00:50 -0700
> Cc: Sean Whitton <spwhitton <at> spwhitton.name>
> 
> The function `map-length' is not available.
> ---
>  packages/seq/tests/seq-tests.el | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/packages/seq/tests/seq-tests.el b/packages/seq/tests/seq-tests.el
> index 53930fa..7a9a452 100644
> --- a/packages/seq/tests/seq-tests.el
> +++ b/packages/seq/tests/seq-tests.el
> @@ -351,6 +351,7 @@ Evaluate BODY for each created sequence.
>                     ["xxx" "xx" "x"]))))
>  
>  (ert-deftest test-seq-random-elt-take-all ()
> +  (skip-unless (version> emacs-version "25"))
>    (let ((seq '(a b c d e))
>          (count '()))
>      (should (= 0 (map-length count)))

A better test is to use fboundp (after requiring the package that
should define it) to probe whether the function exists or not, instead
of relying on the version.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 16:07:01 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24944 <at> debbugs.gnu.org
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 09:06:06 -0700
[Message part 1 (text/plain, inline)]
On Tue, Nov 15, 2016 at 05:20:36PM +0200, Eli Zaretskii wrote:
> A better test is to use fboundp (after requiring the package that
> should define it) to probe whether the function exists or not, instead
> of relying on the version.

Thanks.  Improved patch attached.

Note that this is against the version of seq in elpa.git, not emacs.git

-- 
Sean Whitton
[0001-Skip-test-seq-random-elt-take-all-on-Emacs-24.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 17:04:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Petton <nicolas <at> petton.fr>
To: Sean Whitton <spwhitton <at> spwhitton.name>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 24944 <at> debbugs.gnu.org
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 18:02:56 +0100
[Message part 1 (text/plain, inline)]
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Thanks.  Improved patch attached.

Looks good, but what about not using map.el here (it's an alist) instead
of skipping the test?

Cheers,
Nico
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 17:07:01 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Nicolas Petton <nicolas <at> petton.fr>
Cc: 24944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 10:06:01 -0700
[Message part 1 (text/plain, inline)]
On Tue, Nov 15, 2016 at 06:02:56PM +0100, Nicolas Petton wrote:
> Sean Whitton <spwhitton <at> spwhitton.name> writes:
> 
> > Thanks.  Improved patch attached.
> 
> Looks good, but what about not using map.el here (it's an alist) instead
> of skipping the test?

Are you suggesting: s/map-length/length/ ?

-- 
Sean Whitton
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 20:14:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Petton <nicolas <at> petton.fr>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 24944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 21:13:26 +0100
[Message part 1 (text/plain, inline)]
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Are you suggesting: s/map-length/length/ ?

There's also a usage of `map-put' to replace, as well as the `require'
in the beginning of the file.

However, seq.el was introduced in Emacs 25.1, so in the Emacs repository
there is no need to change anything there.  I suppose you're talking
about the version of seq.el in ELPA?

Cheers,
Nico
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 22:45:01 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Nicolas Petton <nicolas <at> petton.fr>
Cc: 24944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 15:44:27 -0700
[Message part 1 (text/plain, inline)]
Hello,

On Tue, Nov 15, 2016 at 09:13:26PM +0100, Nicolas Petton wrote:
> Sean Whitton <spwhitton <at> spwhitton.name> writes:
> 
> > Are you suggesting: s/map-length/length/ ?
> 
> There's also a usage of `map-put' to replace, as well as the `require'
> in the beginning of the file.

Can the usage of `map-put' be replaced?

If not, it might be best just to wrap both the `require' and the whole
test in my original version check.

> However, seq.el was introduced in Emacs 25.1, so in the Emacs
> repository there is no need to change anything there.  I suppose
> you're talking about the version of seq.el in ELPA?

Yes.

For background, I was prompted to write this patch while updating the
packaging of seq.el in Debian, which for the moment contains both
emacs24 and emacs25.

Thanks!

-- 
Sean Whitton
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Tue, 15 Nov 2016 22:59:01 GMT) Full text and rfc822 format available.

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

From: Nicolas Petton <nicolas <at> petton.fr>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 24944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 23:58:19 +0100
[Message part 1 (text/plain, inline)]
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> Can the usage of `map-put' be replaced?

Yes, I can install a patch if you want.

> For background, I was prompted to write this patch while updating the
> packaging of seq.el in Debian, which for the moment contains both
> emacs24 and emacs25.

Ok, I get it now :)

Nico
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Wed, 16 Nov 2016 00:31:01 GMT) Full text and rfc822 format available.

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

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Nicolas Petton <nicolas <at> petton.fr>
Cc: 24944 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Tue, 15 Nov 2016 17:30:20 -0700
[Message part 1 (text/plain, inline)]
On Tue, Nov 15, 2016 at 11:58:19PM +0100, Nicolas Petton wrote:
> Sean Whitton <spwhitton <at> spwhitton.name> writes:
> 
> > Can the usage of `map-put' be replaced?
> 
> Yes, I can install a patch if you want.

That would be great, but obviously not a priority.  Thanks again for
your feedback.

-- 
Sean Whitton
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24944; Package emacs. (Wed, 16 Nov 2016 17:41:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Petton <nicolas <at> petton.fr>
To: Sean Whitton <spwhitton <at> spwhitton.name>
Cc: 24944 <at> debbugs.gnu.org, 24944-done <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#24944: [PATCH] Skip test-seq-random-elt-take-all on Emacs 24
Date: Wed, 16 Nov 2016 18:40:33 +0100
[Message part 1 (text/plain, inline)]
Sean Whitton <spwhitton <at> spwhitton.name> writes:

> That would be great, but obviously not a priority.  Thanks again for
> your feedback.

I installed a patch in Emacs and ELPA (commit 2d6022a).  I'm closing the
issue.

Cheers,
Nico
[signature.asc (application/pgp-signature, inline)]

Reply sent to Nicolas Petton <nicolas <at> petton.fr>:
You have taken responsibility. (Wed, 16 Nov 2016 17:41:02 GMT) Full text and rfc822 format available.

Notification sent to Sean Whitton <spwhitton <at> spwhitton.name>:
bug acknowledged by developer. (Wed, 16 Nov 2016 17:41:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Dec 2016 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 281 days ago.

Previous Next


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