From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#33998: 27.0.50; cl-delete does not delete the first list element Date: Tue, 08 Jan 2019 21:38:17 +0000 Message-ID: <87muoaltiu.fsf@gmail.com> References: <87muodud4d.fsf@aia00054aia.gr> <39367b1c-ea27-4627-99e3-eb7d0745c60f@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1546983431 4682 195.159.176.226 (8 Jan 2019 21:37:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 8 Jan 2019 21:37:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33998@debbugs.gnu.org, Deus Max To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 08 22:37:07 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggz3Z-00013H-13 for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 22:37:05 +0100 Original-Received: from localhost ([127.0.0.1]:52739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggz5f-0007lc-Jn for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jan 2019 16:39:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggz5Z-0007kc-Az for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 16:39:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggz5X-0002dl-8A for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 16:39:09 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51303) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggz5T-0002bY-IK for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 16:39:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ggz5S-0003Zc-6Y for bug-gnu-emacs@gnu.org; Tue, 08 Jan 2019 16:39:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jan 2019 21:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33998 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 33998-submit@debbugs.gnu.org id=B33998.154698351013670 (code B ref 33998); Tue, 08 Jan 2019 21:39:02 +0000 Original-Received: (at 33998) by debbugs.gnu.org; 8 Jan 2019 21:38:30 +0000 Original-Received: from localhost ([127.0.0.1]:50584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggz4u-0003YO-OZ for submit@debbugs.gnu.org; Tue, 08 Jan 2019 16:38:30 -0500 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:37834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggz4r-0003Y4-VQ for 33998@debbugs.gnu.org; Tue, 08 Jan 2019 16:38:26 -0500 Original-Received: by mail-wm1-f43.google.com with SMTP id g67so5949402wmd.2 for <33998@debbugs.gnu.org>; Tue, 08 Jan 2019 13:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=4LsXwQDo0lpTYVM3naRRU0pkVfAAThUigZ1I+v0W9FM=; b=dFDZK/erduwHcO9F2yZKwG7Xr4sL+oT2wvY/+hne1HZN3mKMoiGC36N1wKuttiHAHr 7MxRvV3qLEpfL8NbR6XjYgy7GmQQxNyxIUfronOtxp3hFhwwn5rqhkxLigBWUZn6lspv 8ZENSLxMjK9741NZEwrTSlrQnGFQf9MS8p4BMzajpFlQeCZ/ucAZ0XtvkRMQ8KwLI1jJ KFo27YRjTKrxkwGulRvy4BKAQF2S75PXpYHqF3G/JJtloG88fs50jI0NDEZRUqCDDqRQ 474pOf/LrM4sNlDzWZCs44nyTnOJ8J2Fqrt/VDcFyi1WWLtmtjjiHF1v3he4ue1m14dM u7tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=4LsXwQDo0lpTYVM3naRRU0pkVfAAThUigZ1I+v0W9FM=; b=OVTzF7+D8QnslucZ+1/peHDwsaN+mbp9RPy510VlnlBn0nGe7Xq6plq+NkjUQNB0DI PgGhZ1Ic97uGRgBsxxixUgtRMTQWIWOr+Jg9ME/f9jQE3mMLd9osaVgahnolb635E6Gz xDtgBH3EWWwqbbxdC7NnMdypmilZ3vXXFlgf0yDpI4H5h6Yvwlh/FlWTynGJBpesNlSz c06RMJa6amsTSL1QY+UC249l0UktxtHuGUQFeJCcFp/DNHcylA5cUOauaetX92LHmIIS Un2r0/jzsFf0yW5WeFn5ji0EmSxay2+X0wZmyBsjFHss2a8DmMYTXtsftltQgSeZNqxq 62Ww== X-Gm-Message-State: AJcUukfpSzK0JibMgdzUxmkvt4xQZd7R11ZyA7NafbCsCP1eUIFYHQ5z bsUu0yxxBfdbDBXwSxBJyB5KYcFb X-Google-Smtp-Source: ALg8bN6H9nsmK53KwpXZqEZaNjIR+MHOi4gzQCvicusVGIr6sUKE5goLg3sAJIYtgYd9JaQe0iM8vQ== X-Received: by 2002:a1c:be11:: with SMTP id o17mr2947611wmf.111.1546983499801; Tue, 08 Jan 2019 13:38:19 -0800 (PST) Original-Received: from lolita.yourcompany.com (188.139.62.94.rev.vodafone.pt. [94.62.139.188]) by smtp.gmail.com with ESMTPSA id x20sm14360689wme.6.2019.01.08.13.38.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jan 2019 13:38:18 -0800 (PST) In-Reply-To: (Drew Adams's message of "Tue, 8 Jan 2019 11:07:03 -0800 (PST)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:154271 Archived-At: Drew Adams writes: > It's not about implementation of `cl-delete'. It's > not about the type of sequence you pass it. It's > about a variable being something different from its > value. Drew, it is you who are missing something basic here: (defun mistery (thing seq) (let ((head (elt seq 0))) (cl-delete thing seq) (eq head (elt seq 0)))) Today, in Emacs this always returns t, for every THING and sequence SEQ you can think of (in fact, for vectors, cl-delete delegates to cl-remove). This is perfectly CL-compliant. But a future, different, also perfectly CL-compliant, implementation of cl-delete, might very well make this function return nil. In fact, if you port this code to SBCL or Allegro CL by changing 'cl-delete' to 'cl:delete' (mistery 1 (list 1 2 3 4)) ;; =3D> t (mistery 1 (vector 1 2 3 4)) ;; =3D> nil So again, for the nth time, it's a bad idea to rely on SEQ after calling 'cl-delete'. Jo=C3=A3o