From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: conditionals in elisp Date: Wed, 28 Oct 2009 07:03:48 -0700 Message-ID: <338FDC005B60474B88160B8579D96637@us.oracle.com> References: <87iqe1og0i.fsf@newsguy.com><14A45A8A6D3A42A7ADA56DE8DB68C74E@us.oracle.com><8763a1o0yx.fsf@newsguy.com> <873a53rij7.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1256740388 15765 80.91.229.12 (28 Oct 2009 14:33:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 28 Oct 2009 14:33:08 +0000 (UTC) To: "'Thien-Thi Nguyen'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 28 15:33:01 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N39a6-0005HB-FT for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 15:32:58 +0100 Original-Received: from localhost ([127.0.0.1]:52271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N39a5-0001Gs-Pe for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Oct 2009 10:32:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N398G-0001fz-Ho for help-gnu-emacs@gnu.org; Wed, 28 Oct 2009 10:04:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N398B-0001ej-V4 for help-gnu-emacs@gnu.org; Wed, 28 Oct 2009 10:04:12 -0400 Original-Received: from [199.232.76.173] (port=36670 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N398B-0001ef-PJ for help-gnu-emacs@gnu.org; Wed, 28 Oct 2009 10:04:07 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:33494 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N398B-00058J-25 for help-gnu-emacs@gnu.org; Wed, 28 Oct 2009 10:04:07 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9SE3ZFE005946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Oct 2009 14:03:37 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n9S8CBXc013663; Wed, 28 Oct 2009 14:05:19 GMT Original-Received: from abhmt004.oracle.com by acsmt355.oracle.com with ESMTP id 20673078311256738633; Wed, 28 Oct 2009 07:03:53 -0700 Original-Received: from dradamslap1 (/24.5.184.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 28 Oct 2009 07:03:53 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcpXsrJCbFpYnqPVSauhhCKRcH0p7gAI14zQ In-Reply-To: <873a53rij7.fsf@ambire.localdomain> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: acsmt354.oracle.com [141.146.40.154] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.4AE84F4F.01B3:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69304 Archived-At: > If these (nicely formatted) examples are useful, they could > be added to the documentation. Perhaps. My main suggestion in this regard was that one can explore - try things interactively, to see what happens. > In any case, in addition to M-:, the *scratch* buffer is also a nice > place to interact with Emacs. There, the values of the > expressions are > inserted into the buffer and so are less fleeting than the output of > M-: in the echo area.... > > Another benefit of experimenting via the *scratch* buffer is that if > something perplexes you there, it is very easy to mail the relevant > fragment when asking for help. I second what Thi says here. I'd also suggest an alternative to using *scratch* - visit a new Emacs-Lisp file and use that buffer, which will be in Emacs-Lisp mode: `C-x C-f whatever.el'. I think Emacs-Lisp mode is generally easier to experiment in than is Lisp-Interaction mode (the mode of buffer *scratch*). In particular, in *scratch*, I too often get caught by the gotcha that `C-j' evaluates, instead of just indenting. But that's probably a problem of habit. In any case, either *scratch* or an Emacs-Lisp buffer is generally better than `M-:' for extended experimenting, because, as Thi said, you can see the input and output, compare results from one evaluation to the next, and easily copy+paste to repeat things or report them. The general point is that Lisp helps you learn Lisp, by being *very* interactive. And one mustn't be afraid to break things or get lost. Just remember that `C-g' cancels what's in progress, and if you fall into the white hole of the debugger, `q' will yank you back out like a bungee cord.