From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tsugutomo.enami@jp.sony.com Newsgroups: gmane.emacs.bugs Subject: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' Date: Thu, 28 Aug 2014 08:49:13 +0900 Message-ID: References: <8ef12222-3e52-4775-ac7f-884030340412@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1409183666 11082 80.91.229.3 (27 Aug 2014 23:54:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Aug 2014 23:54:26 +0000 (UTC) Cc: 18253@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 28 01:54:19 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XMn2g-0000PM-F0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Aug 2014 01:54:18 +0200 Original-Received: from localhost ([::1]:33695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMn2g-0001uw-0t for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Aug 2014 19:54:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMn2W-0001tm-AB for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 19:54:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMn2Q-000164-8c for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 19:54:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMn2Q-00015z-5b for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 19:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XMn2P-0000s4-NJ for bug-gnu-emacs@gnu.org; Wed, 27 Aug 2014 19:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: tsugutomo.enami@jp.sony.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Aug 2014 23:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18253 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18253-submit@debbugs.gnu.org id=B18253.14091835983285 (code B ref 18253); Wed, 27 Aug 2014 23:54:01 +0000 Original-Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 23:53:18 +0000 Original-Received: from localhost ([127.0.0.1]:53926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMn1h-0000qu-AE for submit@debbugs.gnu.org; Wed, 27 Aug 2014 19:53:17 -0400 Original-Received: from ms6.sony.co.jp ([211.125.136.204]:47134) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMn1d-0000qX-Qm for 18253@debbugs.gnu.org; Wed, 27 Aug 2014 19:53:15 -0400 Original-Received: from mta5.noc.sony.co.jp ([IPv6:2001:cf8:0:192::42]) by ms6.sony.co.jp (R8/Sony) with ESMTP id s7RNr5wD021246 for <18253@debbugs.gnu.org>; Thu, 28 Aug 2014 08:53:05 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.04,414,1406559600"; d="scan'208";a="32167881" Original-Received: from sigxcpu.sm.sony.co.jp ([43.4.4.150]) by mrelay5.noc.sony.co.jp with ESMTP; 28 Aug 2014 08:53:06 +0900 Original-Received: by sigxcpu.sm.sony.co.jp (Postfix, from userid 8324) id 77D602DF7C; Thu, 28 Aug 2014 08:49:13 +0900 (JST) In-Reply-To: <537440a2-c7e9-4a65-81e4-7cc7e9a18f97@default> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92748 Archived-At: Hi, I guess the specification of Emacs's remove/remq should be clarified first. If current implementaion is correctly reflecting the specification, then I hope it is documented that those function might not return a copy on some case (in other words, document which can be read as if they always return a copy is confusing). If current implementaion is not correct, then they should be fixed (and documentation is updated to reflect the specification, if necessary). > > The point of remq/remove is non-destructive operation. Whether it > > returns a copy or not is not important. This matches CL's `remove' > > definition. > > No, it does not. From CLTL, section 14.3, "Modifying Sequences": > > The result is a sequence of the same kind as the argument SEQUENCE > that has the same elements except that those in the subsequence > delimited by :start and :end and satisfying the test (see above) > have been removed. This is a non-destructive operation; the result > is a copy of the input SEQUENCE, save that some elements are not > ^^^^^^^^^ > copied. Elements not removed occur in the same order in the result > ^^^^^^ > that they did in the argument. > > That text was in the original edition of CTLT (1984), and it has not > changed one bit in subsequent revisions. Probably, I failed to pick up my word. What I meant was that those function might not return a copy and they doesn't modify its argument is more important aspect. Of course it is importatnt to copy cells when necessary. The `remove' might not return a copy is described in the last sentense of the section (quoted from https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node144.html): The result of remove may share with the argument sequence; a list result may share a tail with an input list, and the result may be eq to the input sequence if no elements need to be removed. enami.