From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: Using setq to obtain a symbol from a list, so that I can assign a function to it Date: Tue, 22 Apr 2008 20:36:44 +0200 Organization: Informatimago Message-ID: <874p9twxc3.fsf@hubble.informatimago.com> References: <48505b79-009c-42c9-912f-219a06474731@f24g2000prh.googlegroups.com> <86d4oh9anu.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208889687 32092 80.91.229.12 (22 Apr 2008 18:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2008 18:41:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 22 20:42:02 2008 connect(): Connection refused 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 1JoNQd-0005wH-3D for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Apr 2008 20:41:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoNPx-00008v-HX for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Apr 2008 14:40:37 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp7-1.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:OG1zDVLIFJ25CwHlqdhZlAmdyi8= Original-Lines: 28 Original-NNTP-Posting-Date: 22 Apr 2008 20:32:26 MEST Original-NNTP-Posting-Host: 88.180.86.168 Original-X-Trace: 1208889146 news-1.free.fr 758 88.180.86.168:46972 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:158116 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:53478 Archived-At: Ted Zlatanov writes: > On Mon, 21 Apr 2008 19:28:03 -0700 (PDT) srinik001@hotmail.com wrote: > > s> So, I am trying to write a tool that will enable me to write specific > s> XML files by prompting me to enter values. Here is how I am trying to > s> do it. > > You may want to look at the various templating packages available, in > case one of them does what you want. Check out skeleton.el in > particular (http://www.emacswiki.org/cgi-bin/wiki/SkeletonMode for some > examples) since any element of the template can itself be a template. > That will probably save you a lot of time. > > Anytime you find yourself auto-generating functions you should wonder if > your data structure could be better (sometimes the answer is 'no' :) Well, I wouldn't be so categoric. You could start by writting an "interpreter" of your data, but generating lisp is like implementing the "compiler", so I don't see much difference. It's so easy to do it in lisp, that you can go directly to the "compiler". -- __Pascal Bourguignon__ http://www.informatimago.com/ THIS IS A 100% MATTER PRODUCT: In the unlikely event that this merchandise should contact antimatter in any form, a catastrophic explosion will result.