From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: About "consing" Date: Thu, 28 Feb 2013 14:43:02 +0000 Message-ID: <155DEC68569B714B86C2C7075F5EDA9828E8EF8C@DAKIYA1.pegasus.local> References: <20130228222312.c355b99ca133f630b9b735f6@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1362062484 22777 80.91.229.3 (28 Feb 2013 14:41:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 14:41:24 +0000 (UTC) To: Xue Fuqiao , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 15:41:44 2013 Return-path: Envelope-to: geh-help-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 1UB4g4-000332-00 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 15:41:44 +0100 Original-Received: from localhost ([::1]:43812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4fj-0004u7-2F for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 09:41:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:57023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4fV-0004sg-Br for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 09:41:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UB4fS-0002Cn-O3 for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 09:41:09 -0500 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:51580) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UB4fS-0002CO-Jb for help-gnu-emacs@gnu.org; Thu, 28 Feb 2013 09:41:06 -0500 Original-Received: from dakiya1.pegasus.local ([172.16.208.201]) by DAKIYA1.pegasus.local ([172.16.208.201]) with mapi id 14.01.0339.001; Thu, 28 Feb 2013 09:43:04 -0500 Thread-Topic: About "consing" Thread-Index: AQHOFb+FoONP24M4SEWQFuPQsXjB3ZiPVakA In-Reply-To: <20130228222312.c355b99ca133f630b9b735f6@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 207.246.209.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89290 Archived-At: You've got it. That's exactly what consing means. It's actually more general than the use that you've mentioned.=20 A CONS cell has two parts: (1) its CAR (a value) and (2) its CDR (a pointer= to the next CONS cell). (The names are historical. I don't know if their e= tymologies matter anymore.) A list is built from CONS cells; the CAR is the= first element and the CDR is the rest of the list (which is itself a list)= . I know that's a little abstract without motivation. See the emacs lisp info= on Lists (which has a section on CONS cells). The section on Building List= s has a picture that shows the connection between CONS cells and lists. ,Douglas Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224 When I do good, I feel good. When I do bad, I feel bad and that's my religi= on. - Abraham Lincoln > -----Original Message----- > From: help-gnu-emacs-bounces+dougl=3Dshubertticketing.com@gnu.org > [mailto:help-gnu-emacs-bounces+dougl=3Dshubertticketing.com@gnu.org] On > Behalf Of Xue Fuqiao > Sent: Thursday, 2013 February 28 09:23 > To: help-gnu-emacs@gnu.org > Subject: About "consing" >=20 > In the doc string of the function `memory-use-counts': >=20 > Return a list of counters that measure how much consing there has > been. >=20 > I don't know what the "consing" means here. I only know that `cons' is > often > used to add a single element to the front of a list. But this seems to > be > irrelevant to the topic. >=20 > And in (info "(elisp) Garbage Collection"): >=20 > -- Function: memory-use-counts > This returns a list of numbers that count the number of objects > created in this Emacs session. >=20 > Does "consing" mean creating an object here? Thanks. >=20 > -- > Best regards, Xue Fuqiao. > http://www.emacswiki.org/emacs/XueFuqiao