From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.devel Subject: Re: delq string element in ido Date: Sat, 26 Dec 2009 15:24:31 +0000 Organization: University of Cambridge Message-ID: References: <20a0c1020912260413j733cda64r68141ad90928113c@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261841153 6146 80.91.229.12 (26 Dec 2009 15:25:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Dec 2009 15:25:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 26 16:25:46 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NOYWW-0002k5-Hh for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 16:25:44 +0100 Original-Received: from localhost ([127.0.0.1]:44803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOYWW-0000I1-Kj for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 10:25:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NOYVw-0008Gy-Ux for emacs-devel@gnu.org; Sat, 26 Dec 2009 10:25:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NOYVr-0008Fh-KR for emacs-devel@gnu.org; Sat, 26 Dec 2009 10:25:08 -0500 Original-Received: from [199.232.76.173] (port=33640 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOYVr-0008Fc-EX for emacs-devel@gnu.org; Sat, 26 Dec 2009 10:25:03 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:45012) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NOYVr-0006H3-2G for emacs-devel@gnu.org; Sat, 26 Dec 2009 10:25:03 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NOYVj-0002Vs-Gt for emacs-devel@gnu.org; Sat, 26 Dec 2009 16:24:55 +0100 Original-Received: from smaug.linux.pwf.cam.ac.uk ([193.60.95.72]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Dec 2009 16:24:55 +0100 Original-Received: from sdl.web by smaug.linux.pwf.cam.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 26 Dec 2009 16:24:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: smaug.linux.pwf.cam.ac.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:53KvNnxQmTa7gkgSwdmDsk+4Crw= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118825 Archived-At: On 2009-12-26 13:05 +0000, Andreas Schwab wrote: > Leo writes: > >> If buf holds "str1" and ido-cur-list '("str1" "str2" "str3"), (delq >> buf ido-cur-list) does not return '("str2" "str3"). But it does inside >> ido-kill-buffer-at-head. That's where I am confused. > > (setq buf (car ido-cur-list)) > (eq (delq buf ido-cur-list) (cdr ido-cur-list)) > > Andreas. Thank you. Now I get it. On 2009-12-26 12:37 +0000, Eli Zaretskii wrote: >> Date: Sat, 26 Dec 2009 12:13:22 +0000 >> From: Leo >> Cc: Leo , emacs-devel@gnu.org >> >> If buf holds "str1" and ido-cur-list '("str1" "str2" "str3"), (delq >> buf ido-cur-list) does not return '("str2" "str3"). But it does inside >> ido-kill-buffer-at-head. That's where I am confused. > > Probably because the value of buf comes from ido-cur-list, so it's the > same Lisp object as one of the strings in ido-cur-list. Indeed, it is due to ido-name. On 2009-12-26 12:34 +0000, Teemu Likonen wrote: [...] > > It's not actually "identical Lisp objects"; eq is about the _same_ Lisp > object. Let me demonstrate: > > (setq my-list (list "one" "two") > my-one (car my-list)) > > Internally my-one and (car my-list) refer to the same Lisp object: > > (eq my-one (car my-list)) > => t > > But in the following examples the string "one" creates new Lisp object > which is different from the one referenced by my-one or (car my-list). > > (eq "one" (car my-list)) > => nil > > (eq "one" my-one) > => nil Many thanks for the detailed explanation. Leo