From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12314: 24.2.50; `add-to-history': use `setq' with `delete' Date: Sat, 8 Sep 2012 23:29:10 -0700 Message-ID: <28FCC57844B14FBE8F4CD6B0B9BAE6B3@us.oracle.com> References: <7602D24B74DE42CF9901322634B85CA2@us.oracle.com> <87sjas4mc2.fsf@gnu.org> <83ipbomv6e.fsf@gnu.org> <2C45207ADF0E46BC98AF1B486695F632@us.oracle.com> <83fw6smti6.fsf@gnu.org> <9A8F619FD7584123A6319BD089E444E4@us.oracle.com> <83bohgmrdv.fsf@gnu.org> <83a9x0mq5e.fsf@gnu.org> <8E40573C868D4B339513A16A02588F5E@us.oracle.com> <837gs4mcqy.fsf@gnu.org> <852E534DA6A342708069D17B8C3C3DFF@us.oracle.com> <834nn7nbno.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1347172186 24182 80.91.229.3 (9 Sep 2012 06:29:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Sep 2012 06:29:46 +0000 (UTC) Cc: 12314@debbugs.gnu.org, cyd@gnu.org To: "'Eli Zaretskii'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 09 08:29:48 2012 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 1TAb1c-0001wN-1q for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2012 08:29:44 +0200 Original-Received: from localhost ([::1]:35628 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAb1Y-0006cl-Qp for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Sep 2012 02:29:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAb1V-0006cQ-L9 for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 02:29:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAb1U-0001W7-At for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 02:29:37 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39899) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAb1U-0001Vw-7U for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 02:29:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TAb1v-0000o2-0Q for bug-gnu-emacs@gnu.org; Sun, 09 Sep 2012 02:30:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Sep 2012 06:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12314-submit@debbugs.gnu.org id=B12314.13471721953058 (code B ref 12314); Sun, 09 Sep 2012 06:30:02 +0000 Original-Received: (at 12314) by debbugs.gnu.org; 9 Sep 2012 06:29:55 +0000 Original-Received: from localhost ([127.0.0.1]:49445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAb1n-0000nG-0Z for submit@debbugs.gnu.org; Sun, 09 Sep 2012 02:29:55 -0400 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:37752) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TAb1j-0000n7-70 for 12314@debbugs.gnu.org; Sun, 09 Sep 2012 02:29:52 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q896TMdn019472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 9 Sep 2012 06:29:22 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q896TL0P008833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Sep 2012 06:29:21 GMT Original-Received: from abhmt105.oracle.com (abhmt105.oracle.com [141.146.116.57]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q896TLuM031665; Sun, 9 Sep 2012 01:29:21 -0500 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 08 Sep 2012 23:29:20 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <834nn7nbno.fsf@gnu.org> Thread-Index: Ac2ONzshdevvNTPJRx2aD5YJ0KNDOAAF9Inw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:63988 Archived-At: > > The fact that modifying the list pointed to by `b' also > > modifies the list pointed to by `a' is an advantage for > > certain kinds of programs. > > I fail to see the utility of this. Building code that relies on > internal implementation details is never a good idea. But that's me; > please don't bother to argue. Intentional list modification is not an implementation detail. That is, it concerns the implementation of your program, of course, but not the implementation of Lisp itself. You have to know what a given Lisp operation does (side effects) and what it returns, but not how it is implemented. My description of this area apparently did not help you. Perhaps someone else can do better. You might start here: (elisp) `Modifying Lists'. You might search there for "share|sharing". You might also google for, say, "lisp sharing list structure modification". Looking at some of the hits, I think several should be helpful. Here's one that might be another place to start: http://en.wikipedia.org/wiki/Lisp_(programming_language)#Shared_structure Perhaps you can imagine a complex program with a humongous graph structure (already you see some sharing), which is dynamically modified. Imagine different views (e.g., variables) into various parts of that structure. This kind of Lisp program is not uncommon in some applications. (The same could be done using Java or C or whatever, but Lisp is good for doing things with lists.) Lisp is not a purely functional language. You need not like that, and you are not forced to use `setf' etc. when programming in Lisp. But such operations are a part of Lisp, and they are used by some Lisp programs. They are not a mistake, but it is possible to make mistakes when using them.