GNU bug report logs - #18555
24.4.50; butlast and nbutlast doesn't handle improper lists

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; Severity: minor; Reported by: Leo Liu <sdl.web@HIDDEN>; dated Thu, 25 Sep 2014 04:07:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 18555) by debbugs.gnu.org; 25 Sep 2014 07:21:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 25 03:21:55 2014
Received: from localhost ([127.0.0.1]:51543 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XX3NC-0004dH-S8
	for submit <at> debbugs.gnu.org; Thu, 25 Sep 2014 03:21:55 -0400
Received: from cantor2.suse.de ([195.135.220.15]:37699 helo=mx2.suse.de)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <schwab@HIDDEN>) id 1XX3NA-0004d2-80
 for 18555 <at> debbugs.gnu.org; Thu, 25 Sep 2014 03:21:53 -0400
Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])
 by mx2.suse.de (Postfix) with ESMTP id 4F55BAD1B;
 Thu, 25 Sep 2014 07:21:51 +0000 (UTC)
From: Andreas Schwab <schwab@HIDDEN>
To: Leo Liu <sdl.web@HIDDEN>
Subject: Re: bug#18555: 24.4.50;
 butlast and nbutlast doesn't handle improper lists
References: <m3ppeke44i.fsf@HIDDEN>
X-Yow: Is this BOISE??
Date: Thu, 25 Sep 2014 09:21:50 +0200
In-Reply-To: <m3ppeke44i.fsf@HIDDEN> (Leo Liu's message of "Thu, 25 Sep
 2014 12:05:49 +0800")
Message-ID: <mvmtx3wkvw1.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -5.7 (-----)
X-Debbugs-Envelope-To: 18555
Cc: 18555 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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: -5.7 (-----)

Leo Liu <sdl.web@HIDDEN> writes:

>   (nbutlast '(1 2 . 3))
>
> throws an error due to `length' which can be fixed
> by using safe-length instead.
>
>   (butlast '(1 2 . 3))
>
> still throws an error due to copy-sequence not taking
> improper list.
>
> What is the right thing to do?

Don't do that then.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@HIDDEN
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."




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

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


Received: (at submit) by debbugs.gnu.org; 25 Sep 2014 04:06:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 25 00:06:40 2014
Received: from localhost ([127.0.0.1]:51482 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XX0KF-0007w7-QS
	for submit <at> debbugs.gnu.org; Thu, 25 Sep 2014 00:06:40 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51526)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0KC-0007vw-W1
 for submit <at> debbugs.gnu.org; Thu, 25 Sep 2014 00:06:37 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0K3-0005qy-JB
 for submit <at> debbugs.gnu.org; Thu, 25 Sep 2014 00:06:36 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55599)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0K3-0005pr-GH
 for submit <at> debbugs.gnu.org; Thu, 25 Sep 2014 00:06:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53220)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0Jp-0003Fe-9r
 for bug-gnu-emacs@HIDDEN; Thu, 25 Sep 2014 00:06:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0Jg-0005p1-9h
 for bug-gnu-emacs@HIDDEN; Thu, 25 Sep 2014 00:06:13 -0400
Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:35469)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XX0Jg-0005ol-1x
 for bug-gnu-emacs@HIDDEN; Thu, 25 Sep 2014 00:06:04 -0400
Received: by mail-pd0-f181.google.com with SMTP id r10so9618685pdi.26
 for <bug-gnu-emacs@HIDDEN>; Wed, 24 Sep 2014 21:05:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version:content-type;
 bh=+8PsLpuwsC2EDiWnj3W6MwcgEahjwcepR4Cj/DleLdY=;
 b=qgxtsmR8NU0egR50O5P7DkTOYYPdzEvKWPf4GDTT8eDXedlgoKTdTAANfs2aqsv6Uk
 zD/vmtd41VYS+dQXKrK+EvSe6QU+VtxMFVRDjE4i+OJykaB9JNWFQOMqWUG+7cOq0QYk
 AnESDkefjn0XNwhoqmdjTMM+jbsVE9zUj4L9CStU7Wqj0xiCNoDO9NwCyixQdAc///pY
 xeoeTQr2jjTXqlgrN7QwuSP74u4fDKiLrZbVNlH40c+FW5L+AH/KS8F3i5U8UXD0X3Gk
 dcXr0CAROq83XdcwXV2XhfsBU8ymlv5NlF6awVVFeR9UYKh5lmvkdQTrolrvaMUMGD32
 GbCQ==
X-Received: by 10.66.66.163 with SMTP id g3mr14239292pat.150.1411617957905;
 Wed, 24 Sep 2014 21:05:57 -0700 (PDT)
Received: from fortuna ([221.222.149.169])
 by mx.google.com with ESMTPSA id ds14sm737509pdb.20.2014.09.24.21.05.55
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.1 cipher=RC4-SHA bits=128/128);
 Wed, 24 Sep 2014 21:05:57 -0700 (PDT)
From: Leo Liu <sdl.web@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.4.50; butlast and nbutlast doesn't handle improper lists
X-Debbugs-CC: 
Date: Thu, 25 Sep 2014 12:05:49 +0800
Message-ID: <m3ppeke44i.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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: -4.0 (----)


  (nbutlast '(1 2 . 3))

throws an error due to `length' which can be fixed
by using safe-length instead.

  (butlast '(1 2 . 3))

still throws an error due to copy-sequence not taking
improper list.

What is the right thing to do?

Leo




Acknowledgement sent to Leo Liu <sdl.web@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#18555; 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: Fri, 31 Oct 2014 17:00:04 UTC

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