From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 12 10:59:44 2014 Received: (at submit) by debbugs.gnu.org; 12 Aug 2014 14:59:44 +0000 Received: from localhost ([127.0.0.1]:40975 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XHDY7-0001Hd-R1 for submit@debbugs.gnu.org; Tue, 12 Aug 2014 10:59:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34308) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XHDY4-0001HP-NS for submit@debbugs.gnu.org; Tue, 12 Aug 2014 10:59:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHDXp-0004Eh-4m for submit@debbugs.gnu.org; Tue, 12 Aug 2014 10:59:35 -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.5 required=5.0 tests=BAYES_05 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHDXp-0004Ed-1U for submit@debbugs.gnu.org; Tue, 12 Aug 2014 10:59:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHDXg-0006px-9M for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 10:59:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHDXW-0004Cc-KN for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 10:59:16 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:16563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHDXW-0004CM-Ei for bug-gnu-emacs@gnu.org; Tue, 12 Aug 2014 10:59:06 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7CEx4Zm011934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Aug 2014 14:59:05 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7CEx3ri019032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Aug 2014 14:59:03 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by userz7022.oracle.com (8.14.5+Sun/8.14.4) with ESMTP id s7CEx2E9019716 for ; Tue, 12 Aug 2014 14:59:02 GMT MIME-Version: 1.0 Message-ID: <8ef12222-3e52-4775-ac7f-884030340412@default> Date: Tue, 12 Aug 2014 07:59:01 -0700 (PDT) From: Drew Adams To: bug-gnu-emacs@gnu.org Subject: 24.4.50; doc string of `remq': correct it per the doc of `remove' X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] 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@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Please explicitly say that `remq' returns a *copy* of LIST, just as we do in the doc string of `remove'. It does *not* "Return LIST with all occurrences of ELT removed." =20 The final sentence of the doc string tries to clarify things, but combined with the first sentence the result is still confusing. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-06-28 on ODIEONE Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/snapshot/trunk --enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3' LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1 -Ic:/Devel/emacs/include'' From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 24 23:19:42 2014 Received: (at 18253) by debbugs.gnu.org; 25 Aug 2014 03:19:42 +0000 Received: from localhost ([127.0.0.1]:51261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLkon-0005em-6R for submit@debbugs.gnu.org; Sun, 24 Aug 2014 23:19:41 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:33200) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XLkok-0005eQ-QS; Sun, 24 Aug 2014 23:19:39 -0400 Received: by mail-lb0-f170.google.com with SMTP id l4so11585781lbv.1 for ; Sun, 24 Aug 2014 20:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x4pcv5uBXsEyDjgmFUUY3r8etDejMKovjB3AdrS+FTg=; b=z3E6fNdFhakLA2MOH1qTpWNx0d2ogxd5NsnHzj7L8uVF3Hxx/rfIjvNA8/3+vaCG7m cfukZE+lPUVy+d17uTFq3G538q/8Tyyj/1Wm0joUegJqrnV6G9vZoRdOBsdF7DTgBGBo +babPZZCNNvIjV3BmO9iKadDJpd3KPFAKS27CwLuCE7IjPHyt85qeq9J/K+s+KPx32ei mUHfY65wPF4JL2oi06FVRjFuBcl/1d6+kl0gvddxAFU6zJOu/tw4vshpqjUSVbd3OybY UQAaF7j6oq0Bu6/K1AB79wgV90W9EGCghJVKPhTZixf6pUO9DZAchU3NRl7s0v18BOBB ax3A== MIME-Version: 1.0 X-Received: by 10.112.105.168 with SMTP id gn8mr5198994lbb.77.1408936772684; Sun, 24 Aug 2014 20:19:32 -0700 (PDT) Received: by 10.152.244.2 with HTTP; Sun, 24 Aug 2014 20:19:32 -0700 (PDT) In-Reply-To: <8ef12222-3e52-4775-ac7f-884030340412@default> References: <8ef12222-3e52-4775-ac7f-884030340412@default> Date: Sun, 24 Aug 2014 21:19:32 -0600 Message-ID: Subject: Re: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' From: Christoph To: Drew Adams Content-Type: multipart/alternative; boundary=001a11345e22d8cf9d05016ba705 X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, 18253-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --001a11345e22d8cf9d05016ba705 Content-Type: text/plain; charset=UTF-8 Thanks for the report. Fixed in trunk r117732. On Tue, Aug 12, 2014 at 8:59 AM, Drew Adams wrote: > > Please explicitly say that `remq' returns a *copy* of LIST, just as we > do in the doc string of `remove'. It does *not* "Return LIST with all > occurrences of ELT removed." > > The final sentence of the doc string tries to clarify things, but > combined with the first sentence the result is still confusing. > > > > In GNU Emacs 24.4.50.1 (i686-pc-mingw32) > of 2014-06-28 on ODIEONE > Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --prefix=/c/Devel/emacs/snapshot/trunk > --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3' > LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1 > -Ic:/Devel/emacs/include'' > > > > --001a11345e22d8cf9d05016ba705 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for the report. Fixed in trunk r117732.


On Tue, Aug 12, 201= 4 at 8:59 AM, Drew Adams <drew.adams@oracle.com> wrote:<= br>

Please explicitly say that `remq' returns a *copy* of LIST, just as we<= br> do in the doc string of `remove'.=C2=A0 It does *not* "Return LIST= with all
occurrences of ELT removed."

The final sentence of the doc string tries to clarify things, but
combined with the first sentence the result is still confusing.



In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
=C2=A0of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
=C2=A0`configure --prefix=3D/c/Devel/emacs/snapshot/trunk
=C2=A0--enable-checking=3Dyes,glyphs 'CFLAGS=3D-O0 -g3'
=C2=A0LDFLAGS=3D-Lc:/Devel/emacs/lib 'CPPFLAGS=3D-DGC_MCHECK=3D1
=C2=A0-Ic:/Devel/emacs/include''




--001a11345e22d8cf9d05016ba705-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 25 18:17:00 2014 Received: (at 18253) by debbugs.gnu.org; 25 Aug 2014 22:17:00 +0000 Received: from localhost ([127.0.0.1]:52033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XM2ZP-0004m3-Jr for submit@debbugs.gnu.org; Mon, 25 Aug 2014 18:16:59 -0400 Received: from ms5.sony.co.jp ([211.125.136.201]:49457) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XM2ZM-0004ln-S4 for 18253@debbugs.gnu.org; Mon, 25 Aug 2014 18:16:58 -0400 Received: from mta6.noc.sony.co.jp ([IPv6:2001:cf8:0:192::43]) by ms5.sony.co.jp (R8/Sony) with ESMTP id s7PMGmxi015134 for <18253@debbugs.gnu.org>; Tue, 26 Aug 2014 07:16:48 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.04,398,1406559600"; d="scan'208";a="32293939" Received: from sigxcpu.sm.sony.co.jp ([43.4.4.150]) by mrelay6.noc.sony.co.jp with ESMTP; 26 Aug 2014 07:16:49 +0900 Received: by sigxcpu.sm.sony.co.jp (Postfix, from userid 8324) id 101442DF7C; Tue, 26 Aug 2014 07:12:58 +0900 (JST) From: tsugutomo.enami@jp.sony.com To: Christoph , Drew Adams Subject: Re: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' In-Reply-To: Date: Tue, 26 Aug 2014 07:12:58 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, > Thanks for the report. Fixed in trunk r117732. > > On Tue, Aug 12, 2014 at 8:59 AM, Drew Adams wrote: > > > > > Please explicitly say that `remq' returns a *copy* of LIST, just as we > > do in the doc string of `remove'. It does *not* "Return LIST with all > > occurrences of ELT removed." IMHO, describing remq to return a copy of list is also confusing. Since it does not return a copy on some cases. enami. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 25 18:37:40 2014 Received: (at 18253) by debbugs.gnu.org; 25 Aug 2014 22:37:40 +0000 Received: from localhost ([127.0.0.1]:52037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XM2tP-0005Ho-LW for submit@debbugs.gnu.org; Mon, 25 Aug 2014 18:37:39 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:32223) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XM2tM-0005HZ-3k for 18253@debbugs.gnu.org; Mon, 25 Aug 2014 18:37:37 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7PMbT50022987 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 Aug 2014 22:37:30 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7PMbSri021017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Aug 2014 22:37:29 GMT Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7PMbSVX020186; Mon, 25 Aug 2014 22:37:28 GMT MIME-Version: 1.0 Message-ID: Date: Mon, 25 Aug 2014 15:37:27 -0700 (PDT) From: Drew Adams To: tsugutomo.enami@jp.sony.com, Christoph Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > > Please explicitly say that `remq' returns a *copy* of LIST, just as w= e > > > do in the doc string of `remove'. It does *not* "Return LIST with al= l > > > occurrences of ELT removed." >=20 > IMHO, describing remq to return a copy of list is also confusing. Since > it does not return a copy on some cases. Good point. Perhaps it should say that it returns either a copy or a tail of the list. It could say something like this, for example: If the only elements in LIST that are `eq' to ELT occur before any other elements then a copy is not made: the tail after the last such occurrence is returned. Whatever language we choose, it should be precise wrt what the behavior is. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 26 14:34:06 2014 Received: (at 18253) by debbugs.gnu.org; 26 Aug 2014 18:34:06 +0000 Received: from localhost ([127.0.0.1]:52731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMLZF-0005JY-2S for submit@debbugs.gnu.org; Tue, 26 Aug 2014 14:34:05 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59020) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMLZC-0005JQ-RO for 18253@debbugs.gnu.org; Tue, 26 Aug 2014 14:34:03 -0400 Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id s7QIY10T019322; Tue, 26 Aug 2014 14:34:01 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F40F3AE093; Tue, 26 Aug 2014 14:34:00 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' Message-ID: References: Date: Tue, 26 Aug 2014 14:34:00 -0400 In-Reply-To: (Drew Adams's message of "Mon, 25 Aug 2014 15:37:27 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5045=0 X-NAI-Spam-Version: 2.3.0.9378 : core <5045> : inlines <1210> : streams <1274489> : uri <1806998> X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, tsugutomo.enami@jp.sony.com, Christoph X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > If the only elements in LIST that are `eq' to ELT occur before any > other elements then a copy is not made: the tail after the last such > occurrence is returned. > Whatever language we choose, it should be precise wrt what the behavior > is. I don't see a need for precision. It should just say that the returned list may share some elements with the original argument, but that no element was modified by side-effect. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 26 14:57:25 2014 Received: (at 18253) by debbugs.gnu.org; 26 Aug 2014 18:57:25 +0000 Received: from localhost ([127.0.0.1]:52750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMLvo-0005vR-RT for submit@debbugs.gnu.org; Tue, 26 Aug 2014 14:57:25 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:41200) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMLvm-0005vB-Hz for 18253@debbugs.gnu.org; Tue, 26 Aug 2014 14:57:23 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7QIvFAH026631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 26 Aug 2014 18:57:16 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7QIvEax006032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 26 Aug 2014 18:57:14 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7QIvDm5006016; Tue, 26 Aug 2014 18:57:14 GMT MIME-Version: 1.0 Message-ID: <73ca6a31-03e0-493a-a4ae-5362597e3a70@default> Date: Tue, 26 Aug 2014 11:57:12 -0700 (PDT) From: Drew Adams To: Stefan Monnier Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, tsugutomo.enami@jp.sony.com, Christoph X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > It should just say that the returned list may share some elements > with the original argument, but that no element was modified by > side-effect. Why would the question of whether an *element* was modified even come up? That seems like a red herring, bound only to confuse people. The question that arises for users is about sharing/modification of the list structure, not elements. (Yes, of course an element can itself be a list.) There is nothing wrong with letting users know the actual behavior. It would be helpful to provide the kind of information that Emacs provides (and all Lisps provide) for `member': "The value is actually the tail of LIST whose car is ELT." But the main point - the point of the bug report, is that it is not correct to say, as we say now, that `remq' "Returns LIST with all occurrences of ELT removed." It does that only when all of the ELT occurrences occur before any non-ELT occurrences. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 26 23:18:12 2014 Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 03:18:13 +0000 Received: from localhost ([127.0.0.1]:53048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMTkS-0002g5-L1 for submit@debbugs.gnu.org; Tue, 26 Aug 2014 23:18:12 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:4107) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMTkO-0002fn-5Z for 18253@debbugs.gnu.org; Tue, 26 Aug 2014 23:18:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0NAIDvNVPAqyTi/2dsb2JhbABZgwaDSopWslmBcIEWCIEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjnoHhDgEqwODTCE X-IPAS-Result: Ai0NAIDvNVPAqyTi/2dsb2JhbABZgwaDSopWslmBcIEWCIEXF3SCJQEBAQECAVYjBQsLNBIUGA0kiAQI0hkXjnoHhDgEqwODTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="87913778" Received: from 192-171-36-226.cpe.pppoe.ca (HELO pastel.home) ([192.171.36.226]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Aug 2014 23:18:02 -0400 Received: by pastel.home (Postfix, from userid 20848) id 1BBA26BC7D; Tue, 26 Aug 2014 23:18:02 -0400 (EDT) From: Stefan Monnier To: Drew Adams Subject: Re: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' Message-ID: References: <73ca6a31-03e0-493a-a4ae-5362597e3a70@default> Date: Tue, 26 Aug 2014 23:18:02 -0400 In-Reply-To: <73ca6a31-03e0-493a-a4ae-5362597e3a70@default> (Drew Adams's message of "Tue, 26 Aug 2014 11:57:12 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, tsugutomo.enami@jp.sony.com, Christoph X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > There is nothing wrong with letting users know the actual behavior. Of course there is: there is another possible behavior, which would generally be superior but which we didn't bother to implement (yet). Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 27 00:55:49 2014 Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 04:55:49 +0000 Received: from localhost ([127.0.0.1]:53131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMVGu-0006MH-Q5 for submit@debbugs.gnu.org; Wed, 27 Aug 2014 00:55:49 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:44417) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMVGt-0006M0-6n for 18253@debbugs.gnu.org; Wed, 27 Aug 2014 00:55:47 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7R4te7e006912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Aug 2014 04:55:41 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s7R4tbdm022301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 27 Aug 2014 04:55:38 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7R4tb6L009258; Wed, 27 Aug 2014 04:55:37 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 26 Aug 2014 21:55:36 -0700 (PDT) From: Drew Adams To: Stefan Monnier Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' References: <73ca6a31-03e0-493a-a4ae-5362597e3a70@default> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, tsugutomo.enami@jp.sony.com, Christoph X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > There is nothing wrong with letting users know the actual behavior. >=20 > Of course there is: there is another possible behavior, which would > generally be superior but which we didn't bother to implement (yet). That's a pretty facile "of course". Of course you can document now the behavior it has now, and if and when you ever change the behavior you can update the doc accordingly. It's not like you just invented `remq' - it's nearly as old as Lisp (at least as old as ZetaLisp). And most (all other?) Lisps have given it the same behavior as `remove', the only difference being to use `eq' instead of `equal'. IOW, they systematically copy the sequence. All the more reason to let users know that Emacs Lisp is exceptional in this regard. It is this part of the Emacs definition that differs from the usual definition, and makes Emacs `remq' unparallel with Emacs `remove': (while (and (eq elt (car list)) (setq list (cdr list)))) From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 27 01:35:04 2014 Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 05:35:04 +0000 Received: from localhost ([127.0.0.1]:53146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMVsu-0000E7-1n for submit@debbugs.gnu.org; Wed, 27 Aug 2014 01:35:04 -0400 Received: from ms4.sony.co.jp ([211.125.136.198]:35112) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMVsq-0000DV-Qq for 18253@debbugs.gnu.org; Wed, 27 Aug 2014 01:35:02 -0400 Received: from mta6.noc.sony.co.jp ([IPv6:2001:cf8:0:192::43]) by ms4.sony.co.jp (R8/Sony) with ESMTP id s7R5Yqqi017791 for <18253@debbugs.gnu.org>; Wed, 27 Aug 2014 14:34:52 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.04,408,1406559600"; d="scan'208";a="32574813" Received: from sigxcpu.sm.sony.co.jp ([43.4.4.150]) by mrelay6.noc.sony.co.jp with ESMTP; 27 Aug 2014 14:34:54 +0900 Received: by sigxcpu.sm.sony.co.jp (Postfix, from userid 8324) id 34D1F2DF7C; Wed, 27 Aug 2014 14:31:01 +0900 (JST) From: tsugutomo.enami@jp.sony.com To: Drew Adams Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' In-Reply-To: Date: Wed, 27 Aug 2014 14:31:01 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, tsugutomo.enami@jp.sony.com, Christoph , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, > And most (all other?) Lisps have given it the same behavior as `remove', > the only difference being to use `eq' instead of `equal'. IOW, they > systematically copy the sequence. How about to avoid the use of word `copy' to describe both `remq' and `remove'? 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. Actually, even the current `remove' implementation does not return a copy when SEQ is not a list and there is nothing to remove. If document explicitly says it returns a copy, reader might think destructive operation can be performed on the result of both functions while expecting original sequence unmodified. enami. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 27 10:07:03 2014 Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 14:07:03 +0000 Received: from localhost ([127.0.0.1]:53715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMdsM-0001qI-Qm for submit@debbugs.gnu.org; Wed, 27 Aug 2014 10:07:03 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:36475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XMdsK-0001pn-Dw for 18253@debbugs.gnu.org; Wed, 27 Aug 2014 10:07:01 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7RE6r9V003960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 27 Aug 2014 14:06:54 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7RE6qX9022612 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Aug 2014 14:06:53 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7RE6pWb020951; Wed, 27 Aug 2014 14:06:51 GMT MIME-Version: 1.0 Message-ID: <537440a2-c7e9-4a65-81e4-7cc7e9a18f97@default> Date: Wed, 27 Aug 2014 07:06:51 -0700 (PDT) From: Drew Adams To: tsugutomo.enami@jp.sony.com Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' References: In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, Christoph , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) > > And most (all other?) Lisps have given it the same behavior as > > `remove', the only difference being to use `eq' instead of `equal'. > > IOW, they systematically copy the sequence. >=20 > How about to avoid the use of word `copy' to describe both `remq' > and `remove'? Because that is precisely what is important. Why "avoid" what it is most important to communicate to users? > 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. > Actually, even the current `remove' implementation does > not return a copy when SEQ is not a list and there is nothing to > remove. I did not check the C code, but all descriptions of Elisp `delete' for a non-list say that it *always* returns a new object. Perhaps all of those descriptions are incorrect (?), in which case we have a bigger doc problem. > If document explicitly says it returns a copy, reader might think > destructive operation can be performed on the result of both > functions while expecting original sequence unmodified. Which is the case for Common Lisp. And which should be the case for Emacs Lisp for the cases that need to be documented as such (i.e. as copying). From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 27 19:53:17 2014 Received: (at 18253) by debbugs.gnu.org; 27 Aug 2014 23:53:18 +0000 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 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 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" 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 Received: by sigxcpu.sm.sony.co.jp (Postfix, from userid 8324) id 77D602DF7C; Thu, 28 Aug 2014 08:49:13 +0900 (JST) From: tsugutomo.enami@jp.sony.com To: Drew Adams Subject: RE: bug#18253: 24.4.50; doc string of `remq': correct it per the doc of `remove' In-Reply-To: <537440a2-c7e9-4a65-81e4-7cc7e9a18f97@default> Date: Thu, 28 Aug 2014 08:49:13 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 18253 Cc: 18253@debbugs.gnu.org, Christoph , Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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. From unknown Sun Aug 17 00:56:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Sep 2014 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator