From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.bugs Subject: bug#25929: 25.2; map-delete doesn't delete permanently 1st alist elt Date: Wed, 27 Apr 2022 23:17:20 -0400 Message-ID: References: <87k288p2oq.fsf@gmail.com> <87r15kezp3.fsf@gnus.org> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 25929@debbugs.gnu.org, nicolas@petton.fr, tino.calancha@gmail.com To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Apr 28 05:18:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njufl-0000KB-Np for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 28 Apr 2022 05:18:29 +0200 Original-Received: from localhost ([::1]:54578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njufk-00033v-JU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Apr 2022 23:18:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njufK-00032z-H3 for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 23:18:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njufK-00009Z-7s for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 23:18:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njufK-0000Hv-3k for bug-gnu-emacs@gnu.org; Wed, 27 Apr 2022 23:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Apr 2022 03:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25929 X-GNU-PR-Package: emacs Original-Received: via spool by 25929-submit@debbugs.gnu.org id=B25929.16511158481065 (code B ref 25929); Thu, 28 Apr 2022 03:18:02 +0000 Original-Received: (at 25929) by debbugs.gnu.org; 28 Apr 2022 03:17:28 +0000 Original-Received: from localhost ([127.0.0.1]:44864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njuel-0000H7-UR for submit@debbugs.gnu.org; Wed, 27 Apr 2022 23:17:28 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njuek-0000Gu-SY for 25929@debbugs.gnu.org; Wed, 27 Apr 2022 23:17:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njuef-0008TZ-A8; Wed, 27 Apr 2022 23:17:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=uTD3Ely4KC0emZ7bRJQWZD1dpxt9M8Wk3JsjsTAWZkY=; b=A4+8ivUWNRCK UfPy80KXMuU2l0d7jftFyeir1Ev5TtaUQ2aQzrwoMMVVGsjvUeXXU2HPx8fI6T/aVr1ER++NUIM5C zp58I7bva/NNR8PT4fHqj05mecE9zH9fHb0lNNhqhVRn2zd7PyiVElMQkuGj3E7nVal4IpwNZGXHg oL9Ez+C7wzv88jQ2E15lDAKlQq2T/nJoQHSLoJRUWjW68xu2UMMVObvg1gYRp8eACrF8iJXiJjeO2 qY36A40RUOyX44U2FXXb+KzNR0LNQ/sEN7Xw9zsF/qBaCBSNzvW6hqlLTHX3o1petAKlH+h+WB17h 4CRZsbgRL64ecfcUALNQYQ==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1njuee-00022n-BQ; Wed, 27 Apr 2022 23:17:20 -0400 In-Reply-To: <87r15kezp3.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 26 Apr 2022 15:34:00 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:230825 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > *) It happens just for alist, other maps are fine. > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > Various things were proposed here, but they all had problems. So I > don't think there's much to be done here except documenting this, which > I've now done in Emacs 29. It is a natural consequence of list structure that deleting the first element doesn't do it destructively, so you need to do (setq foo (delq elt foo)) This is a general principal of deletion in Lisp, so let's teach it to people rather than trying to help people avoid the need to learn it. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)