GNU bug report logs - #26440
seq-mapn fails with circular sequence

Previous Next

Package: emacs;

Reported by: "Phillip Lord" <phillip.lord <at> russet.org.uk>

Date: Tue, 11 Apr 2017 08:14:02 UTC

Severity: normal

Fixed in version 26.1

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Phillip Lord" <phillip.lord <at> russet.org.uk>
Subject: bug#26440: closed (Re: bug#26440: seq-mapn fails with circular
 sequence)
Date: Tue, 01 Aug 2017 18:41:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#26440: seq-mapn fails with circular sequence

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 26440 <at> debbugs.gnu.org.

-- 
26440: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26440
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Nicolas Petton <nicolas <at> petton.fr>
To: Phillip Lord <phillip.lord <at> russet.org.uk>
Cc: 26440-done <at> debbugs.gnu.org, 26440 <at> debbugs.gnu.org
Subject: Re: bug#26440: seq-mapn fails with circular sequence
Date: Tue, 01 Aug 2017 20:40:20 +0200
[Message part 3 (text/plain, inline)]
Nicolas Petton <nicolas <at> petton.fr> writes:

Hi Phillip,

> This is using seq.el from trunk:
>
>   (defvar l '(a c d))
>   (setq l (nconc l l))
>   (seq-mapn #'cons l '(1)) ;; ((a . 1))


I'm closing this issue, but feel free to reopen it if you can reproduce
the problem with master.

Cheers,
Nico
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: "Phillip Lord" <phillip.lord <at> russet.org.uk>
To: bug-gnu-emacs <at> gnu.org
Subject: seq-mapn fails with circular sequence
Date: Tue, 11 Apr 2017 08:12:40 -0000
On Emacs-25 circular structures cause seq-mapn not to terminate
although the documentation suggest that they should.

Consider:

    (defvar l '(a c d))
    (setq l (nconc l l))
    (seq-mapn #'cons l '(1))

This should return '((a . 1)) but actually does not terminate.

The problem is caused by call to seq-into which includes:

    (append sequence nil)

The problem does exist on trunk which does this instead:

    (if (listp sequence)
        sequence
      (append sequence nil)))






This bug report was last modified 7 years and 354 days ago.

Previous Next


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