From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.help Subject: Re: elisp from CL transition guide Date: Sat, 18 Aug 2007 16:39:57 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87d4xlxs5e.fsf@lion.rapttech.com.au> References: <87bqd7g7tx.fsf@pu100877.student.princeton.edu> <87lkcbyccy.fsf@orme.bigwalter.net> <873ayjfzaa.fsf@pu100877.student.princeton.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187429280 13058 80.91.229.12 (18 Aug 2007 09:28:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Aug 2007 09:28:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 18 11:27:56 2007 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 1IMKb6-0001LI-6L for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Aug 2007 11:27:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IMKb5-0007gv-K1 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Aug 2007 05:27:55 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!sn-xt-sjc-03!sn-xt-sjc-09!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:8q/bwmehNLpZvKNv4ok3ElfbBQE= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 45 Original-Xref: shelby.stanford.edu gnu.emacs.help:151101 X-Mailman-Approved-At: Sat, 18 Aug 2007 05:25:37 -0400 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:46675 Archived-At: Tamas Papp writes: > daniel@bigwalter.net (Daniel Jensen) writes: > >> Tamas Papp writes: >> >>> I have some Common Lisp programming experience, and would like to use >>> Emacs Lisp for simple tasks. I found introductions to Elisp, but what >>> I am looking for is some guide that would tell me the differences from >>> CL, to get started quicker. >> >> I don't think that many of the differences between Emacs Lisp and Common >> Lisp will come up while you're getting started. My advice is to take on >> those simple tasks right now and learn by doing. The Emacs Lisp >> Introduction is an excellent tutorial. It will teach you how to think >> about writing Emacs commands. I think that's what you should focus on. >> There is also plenty of source code to read and learn from. > > One thing I don't understand yet is namespaces in Elisp: if I set fill-column in > a buffer (setq fill-column 80), that doesn't seem to affect fill-column in other > buffers. But if I set some other variable eg (setq foo 12), foo will evaluate > to 12 in other buffers. What would be a correct mental model for this? > Probably Schizophrenia ! Actually, emacs has the concept of 'buffer local variables', where the variable binding is local to a buffer. usually, if a buffer local variable is not set directly in a buffer, it will default to the same value as the global variable. However, once it is set, it becomes local to that buffer. When you set it, it doesn't set the global value. Emacs doesn't have package namespaces like CL, which is why most variables are prefixed with the name of the package they belong to. have a look at the documentation for make-local-variable Tim -- Tim Cross tcross@rapttech.com.au There are two types of people in IT - those who do not manage what they understand and those who do not understand what they manage.