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: How to get skills in elisp ? Date: Mon, 25 May 2009 01:17:10 -0700 Message-ID: References: <39c42ea3-0dc4-4364-a3b5-751b28b176b2@y7g2000yqa.googlegroups.com> 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 1243239463 27527 80.91.229.12 (25 May 2009 08:17:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 08:17:43 +0000 (UTC) To: "'Francis Moreau'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 25 10:17:33 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 1M8VND-0007eq-O6 for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 10:17:32 +0200 Original-Received: from localhost ([127.0.0.1]:57705 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8VNC-0001UG-TC for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 04:17:30 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8VMm-0001TB-EY for help-gnu-emacs@gnu.org; Mon, 25 May 2009 04:17:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8VMh-0001RZ-Il for help-gnu-emacs@gnu.org; Mon, 25 May 2009 04:17:03 -0400 Original-Received: from [199.232.76.173] (port=53192 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8VMh-0001RU-DD for help-gnu-emacs@gnu.org; Mon, 25 May 2009 04:16:59 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:43362) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8VMg-0000a7-L4 for help-gnu-emacs@gnu.org; Mon, 25 May 2009 04:16:58 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8VMf-0006i0-Up for help-gnu-emacs@gnu.org; Mon, 25 May 2009 04:16:58 -0400 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4P8Gbfi031225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 25 May 2009 08:16:39 GMT Original-Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n4P8Hc1t026773; Mon, 25 May 2009 08:17:38 GMT Original-Received: from dradamslap1 (/98.210.250.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 25 May 2009 01:16:51 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <39c42ea3-0dc4-4364-a3b5-751b28b176b2@y7g2000yqa.googlegroups.com> Thread-Index: AcndDFfZuLerq5VVTXKKY9U/44SIUwAAsELQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt001.oracle.com [141.146.116.10] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010207.4A1A53F4.0140:SCFSTAT5015188,ss=1,fgs=0 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:64675 Archived-At: > I finally took time to start learning elisp hence nobody can call me > an dumb emacs user ;) > > I started by reading the info files containing the Gnu Emacs Lisp > Reference Manual although I haven't read it entirely. > > But now I got the main picture of the language but I would need some > practice since the reference manual lack of examples before I feel > confortable enough to start writing my own elisp scripts. > > Could anybody give me some direction at that point ? Yes, take a look at the manual (in Info, `C-h i') called `Emacs Lisp Introduction' in the Info menu. The manual title is actually "An Introduction to Programming in Emacs Lisp". It's just what you're looking for. When you want to code something, search (`grep') the existing Emacs-Lisp source code for terms that are pertinent. You can often find code that is similar to what you want to do. This is the way to learn about writing code to change to a different buffer, select a different window, display a buffer, search for text, replace text, and so on - see how the Emacs developers do it. > Also I would like to know how people debug their scripts ? Are there > any tricks ? For now I just write some forms and evaluate > them with 'C-j'. `C-j' evaluates in the *scratch* buffer. I personally don't use *scratch* much. I prefer to create an Emacs-Lisp buffer/file, e.g. foo.el, and work in that, then throw it away. (My fingers can't think of `C-j' as anything other than `newline-and-indent'.) See also `M-:', `eval-region', and `C-x C-e'. See `debug-on-entry'. Put `(debug)' in your code if you want to debug part of a function. Make a function interactive temporarily, to make it easier to call (`M-x', with completion, vs `M-:'). Comment out sections of code using `C-u M-x comment-region' (I bind `comment-region' to `C-x C-;'). Ask questions here. Visit Emacs Wiki (http://www.emacswiki.org/). Have fun!