From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: How to get skills in elisp ? Date: Mon, 25 May 2009 13:50:44 +0200 Message-ID: <4A1A8614.1000600@easy-emacs.de> References: <39c42ea3-0dc4-4364-a3b5-751b28b176b2@y7g2000yqa.googlegroups.com> <9c718a3f-d913-4a8d-b928-443c7e9d25d4@r34g2000vbi.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1243252181 32285 80.91.229.12 (25 May 2009 11:49:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 11:49:41 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Francis Moreau Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon May 25 13:49:34 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 1M8YgP-0007cP-AQ for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 13:49:33 +0200 Original-Received: from localhost ([127.0.0.1]:53714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8YgO-0005kJ-Ln for geh-help-gnu-emacs@m.gmane.org; Mon, 25 May 2009 07:49:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8Yg6-0005jq-7Z for help-gnu-emacs@gnu.org; Mon, 25 May 2009 07:49:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8Yg0-0005im-OT for help-gnu-emacs@gnu.org; Mon, 25 May 2009 07:49:13 -0400 Original-Received: from [199.232.76.173] (port=46954 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8Yg0-0005ij-Cb for help-gnu-emacs@gnu.org; Mon, 25 May 2009 07:49:08 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:53022) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M8Yfz-0001LK-PT for help-gnu-emacs@gnu.org; Mon, 25 May 2009 07:49:08 -0400 Original-Received: from [192.168.178.27] (p54BEB153.dip0.t-ipconnect.de [84.190.177.83]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MKuxg-1M8Yfy1CjS-0000gR; Mon, 25 May 2009 13:49:06 +0200 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <9c718a3f-d913-4a8d-b928-443c7e9d25d4@r34g2000vbi.googlegroups.com> X-Provags-ID: V01U2FsdGVkX19TKjlXrSTDAo7fZhUmA9my8wJmgDjMFY/U6c4 ze//3Jm5SgfjQSa2S3YET2eCAk/qih1pYkVZFdpv8BTArdO2ZM 5ufuUr//GTKx/ZkXHlGan2zUt9AunuDUojIaDOrvdo= 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:64683 Archived-At: Francis Moreau wrote: > Hello, > > [thanks for answering] > > On May 25, 10:17 am, "Drew Adams" wrote: > >> 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. >> > > Ok, I did have a look to this but it starts by; > > "This is an `Introduction to Programming in Emacs Lisp', for people > who are not programmers." > > so since I'm a programmer (well I try to be ;) I just skiped the > document. > > >> 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. >> > > yeah that's a good idea. > > Is there any way to jump into a function definition (for example by > using tags) when asking for help on this function (C-h f) ? > > After C-h f, while info is displayed in other-buffer, I use this (defun jump-to-form () (interactive) (if (featurep 'xemacs) (progn (forward-char 1) (let ((name (symbol-atpt)) (file (progn (search-forward "\"" nil t 1)(filename-atpt)))) (forward-char 1) (help-find-source-or-scroll-up (point)) (switch-to-buffer (current-buffer)) (kill-new name) (search-forward name))) (other-window 1) (forward-button 1) (find-file-at-point))) with key f12 (global-set-key [(f12)] 'jump-to-form) BTW XEmacs user need thing-at-point-utils.el from https://code.launchpad.net/s-x-emacs-werkstatt/ to use this. >>> 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-;'). >> >> > > Ok I'll do, thanks for the tips. > > >> Ask questions here. Visit Emacs Wiki (http://www.emacswiki.org/). Have fun! >> > > thanks > >