From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 16:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9082@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131066171817652 (code B ref -1); Thu, 14 Jul 2011 16:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jul 2011 16:41:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhOz7-0004ae-4D for submit@debbugs.gnu.org; Thu, 14 Jul 2011 12:41:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhNSD-0000bA-B0 for submit@debbugs.gnu.org; Thu, 14 Jul 2011 11:03:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhNS3-0003yV-MO for submit@debbugs.gnu.org; Thu, 14 Jul 2011 11:03:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhNS3-0003yQ-Gt for submit@debbugs.gnu.org; Thu, 14 Jul 2011 11:03:43 -0400 Received: from eggs.gnu.org ([140.186.70.92]:48026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhNRz-0003my-5n for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 11:03:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhNRv-0003xr-1P for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 11:03:39 -0400 Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143]:59432 helo=topper.koldfront.dk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhNRu-0003xk-HV for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2011 11:03:34 -0400 Received: by topper.koldfront.dk (Postfix, from userid 1000) id E49AC50FA70D; Thu, 14 Jul 2011 17:03:30 +0200 (CEST) X-Hashcash: 1:21:110714:bug-gnu-emacs@gnu.org::XwZQoMf45NH+9659:00000000000000000000000000000000000000002j2h From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Organization: koldfront - analysis & revolution, Copenhagen, Denmark X-Now-Playing: Daisies, Once upon a time in the north (moi caprice) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Thu, 14 Jul 2011 12:41:55 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) ** Description Adds hints to the documentation of car and cdr to help newbies remember which is which. Saying that (car|cdr) returns the (car|cdr) of a LIST is a little terse for beginners (probably the only ones looking at the documentation of such basic functions). ** ChangeLog 2011-07-14 Adam Sj=F8gren * data.c (car, cdr): add functionality hints to documentation. ** Patch =3D=3D=3D modified file 'src/data.c' *** src/data.c 2011-07-10 08:20:10 +0000 --- src/data.c 2011-07-14 13:23:02 +0000 *************** DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, *** 463,469 **** /* Extract and set components of lists */ =20=20 DEFUN ("car", Fcar, Scar, 1, 1, 0, ! doc: /* Return the car of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `car-safe'. =20=20 See Info node `(elisp)Cons Cells' for a discussion of related basic --- 463,469 ---- /* Extract and set components of lists */ =20=20 DEFUN ("car", Fcar, Scar, 1, 1, 0, ! doc: /* Return the car (first element) of LIST. If arg is nil, re= turn nil. Error if arg is not nil and not a cons cell. See also `car-safe'. =20=20 See Info node `(elisp)Cons Cells' for a discussion of related basic *************** DEFUN ("car-safe", Fcar_safe, Scar_safe, *** 481,487 **** } =20=20 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, ! doc: /* Return the cdr of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `cdr-safe'. =20=20 See Info node `(elisp)Cons Cells' for a discussion of related basic --- 481,487 ---- } =20=20 DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, ! doc: /* Return the cdr (rest) of LIST. If arg is nil, return nil. Error if arg is not nil and not a cons cell. See also `cdr-safe'. =20=20 See Info node `(elisp)Cons Cells' for a discussion of related basic From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 14:31:48 2011 Received: (at control) by debbugs.gnu.org; 14 Jul 2011 18:31:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhQhQ-0002Aw-6b for submit@debbugs.gnu.org; Thu, 14 Jul 2011 14:31:48 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhQhO-0002Al-FY for control@debbugs.gnu.org; Thu, 14 Jul 2011 14:31:46 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhQhD-0006S7-5v for control@debbugs.gnu.org; Thu, 14 Jul 2011 20:31:35 +0200 Date: Thu, 14 Jul 2011 20:31:34 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #9082 X-MailScanner-ID: 1QhQhD-0006S7-5v X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311273095.88219@QyhGJSoJ8uQaY3TAzazD5A X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 9082 fixed close 9082 24.1 From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 18:48:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Cc: 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.131066923713275 (code B ref 9082); Thu, 14 Jul 2011 18:48:05 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 18:47:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhQwN-0003S0-Pt for submit@debbugs.gnu.org; Thu, 14 Jul 2011 14:47:16 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhQwI-0003RK-D6 for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 14:47:11 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhQw5-0006i4-5k; Thu, 14 Jul 2011 20:46:57 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <8762n4ewfx.fsf@topper.koldfront.dk> ("Adam \=\?iso-8859-1\?Q\?Sj\?\= \=\?iso-8859-1\?Q\?\=F8gren\=22's\?\= message of "Thu, 14 Jul 2011 17:03:30 +0200") Date: Thu, 14 Jul 2011 20:31:32 +0200 Message-ID: References: <8762n4ewfx.fsf@topper.koldfront.dk> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Joni Mitchell's _Dog Eat Dog_: "Lucky Girl" X-Hashcash: 1:23:110714:asjo@koldfront.dk::ejXsOMRAccLc1zri:00000000000000000000000000000000000000000000AOlJ X-Hashcash: 1:23:110714:9082@debbugs.gnu.org::opaYMrlYg0NsRbTW:00000000000000000000000000000000000000000GP3/ MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1QhQw5-0006i4-5k X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311274017.31747@twIkdQgUQKKhA61y7N3z7g X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) asjo@koldfront.dk (Adam Sj=F8gren) writes: > 2011-07-14 Adam Sj=F8gren > > * data.c (car, cdr): add functionality hints to documentation. I've applied your patch to Emacs 24, although... > DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, > ! doc: /* Return the cdr (rest) of LIST. If arg is nil, return ni= l. this is kinda still wrong-ish. I mean, you can take the cdr of a cons cell. The cdr isn't more `rest' then the car is. However, since the documentation says LIST, I guess it's OK. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 19:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Magne Ingebrigtsen Cc: 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.131067117023119 (code B ref 9082); Thu, 14 Jul 2011 19:20:03 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 19:19:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhRRW-00060m-ED for submit@debbugs.gnu.org; Thu, 14 Jul 2011 15:19:30 -0400 Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143] helo=topper.koldfront.dk) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhRRQ-00060U-MC for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 15:19:25 -0400 Received: by topper.koldfront.dk (Postfix, from userid 1000) id C583650FA70D; Thu, 14 Jul 2011 21:19:13 +0200 (CEST) From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Organization: koldfront - analysis & revolution, Copenhagen, Denmark References: <8762n4ewfx.fsf@topper.koldfront.dk> X-Now-Playing: Talkin' World War III Blues, Live 1964 (cd 2) (Bob Dylan) X-Hashcash: 1:21:110714:larsi@gnus.org::bOfs1Fzse5Iyok1V:0000tXK X-Hashcash: 1:21:110714:9082@debbugs.gnu.org::w/FEreiW0F5uHcsw:000000000000000000000000000000000000000002DYB X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR (Lars Magne Ingebrigtsen's message of "Thu, 14 Jul 2011 20:31:32 +0200") Message-ID: <87k4bkd61a.fsf@topper.koldfront.dk> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) On Thu, 14 Jul 2011 20:31:32 +0200, Lars wrote: > asjo@koldfront.dk (Adam Sj=F8gren) writes: >> * data.c (car, cdr): add functionality hints to documentation. > I've applied your patch to Emacs 24, although... Thanks! >> DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, >> ! doc: /* Return the cdr (rest) of LIST. If arg is nil, return n= il. > this is kinda still wrong-ish. I mean, you can take the cdr of a cons > cell. The cdr isn't more `rest' then the car is. However, since the > documentation says LIST, I guess it's OK. I see what you mean. I just read 'LIST' and looked at wikipedia=B9 and... Please correct it, if possible ;-) Best regards, Adam =B9 "When cons cells are used to implement singly linked lists (rather than trees and other more complicated structures), the car operation returns the first element of the list, while cdr returns the rest of the list." - http://en.wikipedia.org/wiki/CAR_and_CDR --=20 "Good car to drive after a war" Adam Sj=F8gren asjo@koldfront.dk From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Cc: Lars Magne Ingebrigtsen , 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.131067288128959 (code B ref 9082); Thu, 14 Jul 2011 19:48:02 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 19:48:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhRt7-0007Ww-5j for submit@debbugs.gnu.org; Thu, 14 Jul 2011 15:48:01 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhRt1-0007Wg-1J for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 15:47:55 -0400 Received: from localhost ([127.0.0.1]:40758) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhRst-0003RV-Rg; Thu, 14 Jul 2011 15:47:43 -0400 From: Glenn Morris References: <8762n4ewfx.fsf@topper.koldfront.dk> <87k4bkd61a.fsf@topper.koldfront.dk> X-Spook: president Rule Psix mindwar industrial espionage X-Ran: yA5VN?150p;cf7or0jY-#{,{lt@|={9v$l$dE9sl$i:I|c6^=vEF> ("Adam =?UTF-8?Q?Sj=C3=B8gren?="'s message of "Thu, 14 Jul 2011 21:19:13 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.4 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) >>> DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, >>> ! doc: /* Return the cdr (rest) of LIST. If arg is nil, return = nil. [...] > =C2=B9 "When cons cells are used to implement singly linked lists (rather > than trees and other more complicated structures), the car operation > returns the first element of the list, while cdr returns the rest of > the list." - http://en.wikipedia.org/wiki/CAR_and_CDR To me, "rest" means nothing with no context. It's fine to say: "A returns the first element, and B the rest." But just saying on its own "B returns the rest" with no reference to A means nothing. I might say "B returns everything but the first element". But really, one should read the Lisp intro or something if one does not know what car and cdr mean. The doc string of such fundamental functions shouldn't be expected to bootstrap from zero knowledge IMO. Oh, I see there is already a reference to the lisp manual in these doc strings. So personally I don't think any change was needed... Also to complete my bitching, this should be marked "tiny change" since we don't have an Emacs assignment (only a Gnus one). From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 20:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Glenn Morris Cc: Adam =?UTF-8?Q?Sj=C3=B8gren?= , 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.131067419230759 (code B ref 9082); Thu, 14 Jul 2011 20:10:03 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 20:09:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSEG-000800-Ic for submit@debbugs.gnu.org; Thu, 14 Jul 2011 16:09:52 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSE9-0007zj-Ig for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 16:09:45 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhSDw-00006U-8J; Thu, 14 Jul 2011 22:09:28 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: (Glenn Morris's message of "Thu, 14 Jul 2011 15:47:43 -0400") Date: Thu, 14 Jul 2011 22:09:24 +0200 Message-ID: References: <8762n4ewfx.fsf@topper.koldfront.dk> <87k4bkd61a.fsf@topper.koldfront.dk> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVMZD/l4dCFoIhqhWak uKgjKBJFDs5SAAACY0lEQVQ4jV2TW3LkIAxFVSZegBMW4Ajmn5LwfxtrAVR32P9W5srtzmRCPwpz kHT1MLW8x8XXvvy3yLDOXVx2sxhfNygCnFtbsIsW9x3fJdLyAvGno2hku+Xnfv8BWyX7vB6jnWA/ I2YlfqmKbf8WZpwIji5wOrvA0Sgz5xf4Dt2SUlJu+ZcqY2Fire+eZPwJVAOJiv1ydNihRKbCnsH+ D+jyUYia6hn9BTzw8gELVRXJV3Az5qS6uCsNqrgdXTZLYuUx3rZxWtTFIg78Ln4AfX6C3NhaEnbV lm/beKP+BEX8+lWRto0wuhCQBVegl9p8aMYjlVDbJEqaLrl70yVpolAyB9Eg7VldtPowRYJhaoGK JjkaagAVkH3TFaSmMA8EWfFLSFbYM0gwCQAw0eyJqGTj48g3ovlBng9JjugDEvy01ipczZ22MY/x yB778Ozzu/YT4HgMqq42iRpTOxyMcIIRMopbVSrfyh9xcFr0EWQlmlxzm0o7wXhaUJEUNOeU5Mvo 8gOLTsE7ku1YN9tJtyeYZlIQ6M3HfMdQX+BRUR8tYnB3bHhTTtDHwHMqWaVIbSksuVFwC4hRv79O mT9zu5slemrNjL5h/CZk0uzerFDxctBD59HRFGpe+S8Ui3QGQAHwF4qQsFi7izKAu/JzCt6DVq35 jODjwdFhpA7BemDyOs+Bgpt0dGhzX6He8loeCe3Q4pPXMUHUUc5p5XX04lOFSfGp07PXpRdO6BBG Ecl60zAEmjCPZWOeyVfyu2gBc8E0Ju2IvUIdgFSDEj4Hpglxuie8G+TXYSC8ul+WVdYHzsNfdImx 3oDWlmgAAAAASUVORK5CYII= X-Now-Playing: Joni Mitchell's _For The Roses_: "Judgement Of The Moon And Stars (Ludwig's Tune)" X-Hashcash: 1:23:110714:rgm@gnu.org::czqat25P4zRGtlZ9:000000AvlY X-Hashcash: 1:23:110714:asjo@koldfront.dk::8Hm5HfjnSnzjrJN3:00000000000000000000000000000000000000000000R4Kl X-Hashcash: 1:23:110714:9082@debbugs.gnu.org::m8VO83qO9eaF2H4Y:00000000000000000000000000000000000000000wsdb MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QhSDw-00006U-8J X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311278968.47049@tAaLHli4lk0nCnPTzqIKNQ X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Glenn Morris writes: > To me, "rest" means nothing with no context. > It's fine to say: "A returns the first element, and B the rest." > But just saying on its own "B returns the rest" with no reference to A > means nothing. > I might say "B returns everything but the first element". And it's still not precise, since "first element" has no meaning if it's not a list, but just a cons cell. I've now reverted the patch. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 20:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Lars Magne Ingebrigtsen , Glenn Morris Cc: 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.131067529532329 (code B ref 9082); Thu, 14 Jul 2011 20:29:02 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 20:28:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSW6-0008PO-3e for submit@debbugs.gnu.org; Thu, 14 Jul 2011 16:28:14 -0400 Received: from 2505ds5-by.0.fullrate.dk ([95.166.24.143] helo=topper.koldfront.dk) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSW4-0008PD-DQ for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 16:28:13 -0400 Received: by topper.koldfront.dk (Postfix, from userid 1000) id C29A250FA70D; Thu, 14 Jul 2011 22:28:06 +0200 (CEST) From: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Organization: koldfront - analysis & revolution, Copenhagen, Denmark References: <8762n4ewfx.fsf@topper.koldfront.dk> <87k4bkd61a.fsf@topper.koldfront.dk> X-Now-Playing: Talkin' World War III Blues, Live 1964 (cd 2) (Bob Dylan) X-Hashcash: 1:21:110714:9082@debbugs.gnu.org::4ziS8WxvCsrTYdW4:000000000000000000000000000000000000000000gG4 X-Hashcash: 1:21:110714:rgm@gnu.org::rxOTkxxGfi5fxrGI:000000CY0s X-Hashcash: 1:21:110714:larsi@gnus.org::sApAJqlKDqnG5oMi:000FLik X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR (Lars Magne Ingebrigtsen's message of "Thu, 14 Jul 2011 22:09:24 +0200") Message-ID: <87wrfkboa1.fsf@topper.koldfront.dk> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) I am sorry, but this is depressing. Only a newbie would look up the documentation of car and cdr. This newbie finds this documentation: "(car LIST) Return the car of LIST." "(cdr LIST) Return the cdr of LIST." to be unhelpful to the brink of being a slap in the face. "Nyah, nyah, you don't remember what part of a cons cell is named what - and we wo-on't tell you!" Could you please consider trying to find a way to hint to the casual lisp user which function does which? I am perfectly fine with my suggestion being dismissed as meaningless and wrong, and I agree that this is stuff you learn on your first day of learning lisp. But please try to put yourself into the mind of someone who remembers the concept of those two functions, but can't remember which is which - a casual user of lisp, looking up the functions in the builtin docs. Sure, you can quickly try them, or you can figure out why the (elisp)Cons cells link doesn't work in your emacs-snapshot instance and read up on it there, or you can find the answer on wikipedia - but just a little hint in the documentation of the functions we are talking about would have quenched the frustration instantly. The target demographic for these texts surely would be someone for whom "car returns the car, cdr returns the cdr" isn't helping? I hate to be such a bikeshedder, but I think that you two are way too good at lisp to have reached the right solution here. Anyway, thanks for your time. Best regards, Adam --=20 "Good car to drive after a war" Adam Sj=F8gren asjo@koldfront.dk From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lisp newcomers Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 20:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: asjo@koldfront.dk (Adam =?UTF-8?Q?Sj=C3=B8gren?=) Cc: Glenn Morris , 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.1310675894871 (code B ref 9082); Thu, 14 Jul 2011 20:39:02 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 20:38:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSfl-0000E0-7N for submit@debbugs.gnu.org; Thu, 14 Jul 2011 16:38:13 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhSfi-0000Dn-Jr for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 16:38:11 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhSfV-0000Ua-Ds; Thu, 14 Jul 2011 22:37:57 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <87wrfkboa1.fsf@topper.koldfront.dk> ("Adam \=\?iso-8859-1\?Q\?Sj\?\= \=\?iso-8859-1\?Q\?\=F8gren\=22's\?\= message of "Thu, 14 Jul 2011 22:28:06 +0200") Date: Thu, 14 Jul 2011 22:37:53 +0200 Message-ID: References: <8762n4ewfx.fsf@topper.koldfront.dk> <87k4bkd61a.fsf@topper.koldfront.dk> <87wrfkboa1.fsf@topper.koldfront.dk> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX89vP27ekRDwikmY4E AwE/NifXysHm29X0SzAeAAACKUlEQVQ4jWWSS6+bMBCFQZVyt1iVwt4J2TeOnb1r9hXgdJtcxLAN RbX/fmf8CGk7iwjmy5nj46Eoq7L4rxhj+bEqasaqjyU2yg3AAxzMOwXPv0HJipJGllnwUvzjsIGd uGdxRf06vX05mvb5LsjglzHmZ7aLgFX0duHGtG8C5ovoIq9no+9vAogHLOVzN5gfue+9E6jAWV85 sMmcku84zmMfn6cWinVo43QnBMhbAPVkUXbRCz47QCDkGIBT8j5/dOZBrmKU1lpBwAt//lbtZE9i IUabgbvuz0J4Qf8BmtNLbouF+XHeDzc/NWL2tQ/lYCy8X8U8HrU9YnblcwGCySonTSjdz6mPYPFS wWRSHTzLisWvkuakukUfV3jXr7iMF2nnYA4FrF1n9HV4SVSwgGJe0bjZTMwJJTMBNxl9WzYQZqG5 g088yxRHabTS12ju4GK07W3oc067T6eCwTQCutBvuOHmFI6FHoPuJ4Ffg6Zb5RYzxoCO2170Yu7t owZcBUaMYG2tUHixDD/3/So7DTGg/60boayitdbejQQcBfSfmltLuwiJEaiY3GMMw3mDm8OFWnvU ABugo+KJQgwEEO7q8gJIaI3gIhhoUmg3QdMmBUTQ2Q6N8Of4PYERxwRJx22D3iaDcN/4X7qN7ia5 OWyKBLCudgNAXw6PfavQPI+ipeokIIsNnAnI0O5ijgQwIO8RNBTQvANcqEiTSJGvBAatD1MCHQEV wB+zXRnbvsWS1QAAAABJRU5ErkJggg== X-Now-Playing: Joni Mitchell's _Hejira_: "Hejira" X-Hashcash: 1:23:110714:rgm@gnu.org::OWCeLAp5DcswANAO:0000001Lil X-Hashcash: 1:23:110714:9082@debbugs.gnu.org::49OBEUz1BWy4eLQ4:00000000000000000000000000000000000000000Azko X-Hashcash: 1:23:110714:asjo@koldfront.dk::wfaaw8dEgmluesC1:00000000000000000000000000000000000000000000V/Ug MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1QhSfV-0000Ua-Ds X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311280677.51916@BttnPV9HdTva5Z20Br2AtA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) asjo@koldfront.dk (Adam Sj=F8gren) writes: > Sure, you can quickly try them, or you can figure out why the > (elisp)Cons cells link doesn't work in your emacs-snapshot instance and Funnily enough, I think I fixed that bug earlier today. :-) > read up on it there, or you can find the answer on wikipedia - but just > a little hint in the documentation of the functions we are talking about > would have quenched the frustration instantly. > > The target demographic for these texts surely would be someone for whom > "car returns the car, cdr returns the cdr" isn't helping? It's really hard to explain these two functions, because they are so simple and have little intrinsic meaning. Which is why they were called why they're called, and not `first' and `rest' (which also has proponents). If a user sees (setq a '(foo . bar)) (zot (cdr a)) I don't see how looking up `cdr' and seeing "(rest)" really unconfuses all that much. Pointing to the manual is the only thing that will help here, in my opinion. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sat Jun 21 12:21:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9082: Add hints to documentation of car and cdr for (e)lispnewcomers Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2011 21:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9082 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: "'Lars Magne Ingebrigtsen'" , "'Adam "=?UTF-8?Q?Sj=C3=B8gren?="'" Cc: 9082@debbugs.gnu.org Received: via spool by 9082-submit@debbugs.gnu.org id=B9082.13106784297829 (code B ref 9082); Thu, 14 Jul 2011 21:21:01 +0000 Received: (at 9082) by debbugs.gnu.org; 14 Jul 2011 21:20:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhTKd-00022E-Rb for submit@debbugs.gnu.org; Thu, 14 Jul 2011 17:20:28 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhTKb-00021z-Jn for 9082@debbugs.gnu.org; Thu, 14 Jul 2011 17:20:26 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p6ELKHp5010886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 14 Jul 2011 21:20:19 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p6ELKG5O015295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Jul 2011 21:20:17 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p6ELKBA2017515; Thu, 14 Jul 2011 16:20:11 -0500 Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jul 2011 14:20:10 -0700 From: "Drew Adams" References: <8762n4ewfx.fsf@topper.koldfront.dk><87k4bkd61a.fsf@topper.koldfront.dk> <87wrfkboa1.fsf@topper.koldfront.dk> Date: Thu, 14 Jul 2011 14:20:10 -0700 Message-ID: <1256EB77949E454AA43F66126A20F749@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcxCZ21R+UwbEvMASpuhmDZesja+bQAAmqQQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4E1F5D93.0032:SCFMA922111,ss=1,re=-4.000,fgs=0 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) > It's really hard to explain these two functions, because they are so > simple and have little intrinsic meaning. Which is why they > were called why they're called, and not `first' and `rest' (which also has > proponents). No, that is not the reason why they were called `car' and `cdr'. http://en.wikipedia.org/wiki/CAR_and_CDR And no, it's not difficult to describe these two functions. It's nearly enough to say: 1. `cons' creates a pair (called a "cons cell" or a "cons") from its two arguments. 2. (car (cons a b)) = a (cdr (cons a b)) = b That's in fact the definition, and it's a pretty good explanation too. I say "nearly" enough because it also helps to explain more about conses and list structure (what's shared, what is not, etc.). Lisp is not a purely functional language, so while #2 above defines these two functions functionally, it does not describe them in terms of behavior. Mainly because it begs the question of `cons', which is not a pure function and which is where list structure comes into the picture. If `cons' were simply a constructor in the functional language (or rewrite or algebra) sense of that word (essentially an undefined function), then #2 above would suffice. > If a user sees > (setq a '(foo . bar)) > (zot (cdr a)) > I don't see how looking up `cdr' and seeing "(rest)" really > unconfuses all that much. Pointing to the manual is the only > thing that will help here, in my opinion. Here, I agree with you, Lars. `rest' does not describe `cdr', especially when `rest' is thought of in terms of purely functional languages. Again, the nub is `cons' and the behavior. It is also true as has been pointed out that the word `rest' is a better fit for true lists than for conses.