From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: marcuirl Newsgroups: gmane.emacs.help Subject: Re: Advice on writing packages please Date: Tue, 20 May 2003 10:34:33 +0200 Organization: EPFL Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1053419814 26474 80.91.224.249 (20 May 2003 08:36:54 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 20 May 2003 08:36:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue May 20 10:36:51 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19I2c6-0006sa-00 for ; Tue, 20 May 2003 10:36:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19I2ah-0000wD-7w for gnu-help-gnu-emacs@m.gmane.org; Tue, 20 May 2003 04:35:23 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Emacs Gnus Cancel-Lock: sha1:wDbb5BbH2QWT7SLzP9Vt+sI0JgM= Original-NNTP-Posting-Host: crpppc215.epfl.ch Original-X-Trace: epflnews.epfl.ch 1053419695 128.178.125.18 (20 May 2003 10:34:55 +0200) Original-Lines: 82 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!solnet.ch!solnet.ch!news.imp.ch!news.imp.ch!news-zh.switch.ch!epflnews.epfl.ch!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:113419 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9914 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9914 Oliver Scholz writes: > marcuirl writes: > >> Hey all, >> >> I am just about ready to start writing an emacs package of my >> own. Some of the ones I have to use just don't do it for me anymore! >> So at least I have a source to work from. >> >> I have reasonable programming skills, though little in lisp ;-) so I >> gain two skills from this! The questions I have: >> >> Is there a source of info on the web that I can use to help in writing >> major modes for emacs? >> >> What advice would you guys/gals give an enthusiastic newbie to this >> field? > > I assume that you already have the Emacs Lisp Reference Manual. Maybe > you could also have a look at Robert Chassel's "Introduction to Emacs > Lisp". The latter targets non-Programmers as an audience, but if you > are very new to Lisp there might still be something helpful for you. > > Furthermore have a look at the Emacs Wiki: > , it is an excellent resource for all > kind of information about Emacs Lisp: examples, tipps, code snippets. > > For major modes I have the following links in my private Wiki: > > - Tutorial > http://two-wugs.net/emacs/mode-tutorial.html > > - Generic mode: for simple modes > http://www.emacswiki.org/cgi-bin/wiki.pl?GenericMode > > - derived modes > http://www.emacswiki.org/cgi-bin/wiki.pl?DerivedMode > > - Short example > http://www.emacswiki.org/cgi-bin/wiki.pl?SampleMode > > And when you encounter a particular problem, you can always ask here, > of course. > >> Then also some ideas on really basic stuff like: >> >> When editing an xx.el file for mode xx do you need to keep starting a >> new emacs session for the changes to take effect? Is there an easier >> way to do this? > > Uh, no, Elisp is an interactive language and -- moreover -- you have > access to the Lisp interpreter all the time. (Even typing means > executing Lisp commands.) So most changes take effect as soon as you > evaluate them with `C-x C-e' or `M-x eval-buffer'. There are a few > exceptions to that rule, the most notable being `defvar' and > `defcustom' forms. But you can force evalutation of those forms by > typing `M-C-x' with point in such a form in emacs-lisp-mode. (In > emacs-lisp-mode `M-C-x' works for evaluating `defun's, too.) So at > most you have to execute the initialisation of your major mode in a > particular buffer again (by typing `M-x ') to make > your changes take effect. No need to restart Emacs, unless you have > messed up the state of the session. > > You could also look at edebug (described in the Emacs Lisp > Reference), which is a stepper for Elisp. Invoke it with `C-u M-C-x' > with point in a `defun'. > > Does that help? sorry for the late reply, I've had a promlem with gmane.org! This is excelent info, thanks Oliver, its just the little push in the right direction that I needed. I'll probably be back soon with many more questions once I get set up in my project! marcu -- Unless otherwise noted, the statements herein reflect my personal opinions and not those of any organisation with which I may be affiliated.