From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Adding Easy Templates Date: Wed, 23 May 2012 15:28:28 +0200 Message-ID: <688B6FE9-3E38-4159-8528-AE68B4E9FB14@gmail.com> References: <87d35vxcuc.wl%ded-law@ddoherty.net> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXBcH-0007AG-Dh for emacs-orgmode@gnu.org; Wed, 23 May 2012 09:28:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXBcB-0008Q2-4k for emacs-orgmode@gnu.org; Wed, 23 May 2012 09:28:40 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:46498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXBcA-0008PZ-SK for emacs-orgmode@gnu.org; Wed, 23 May 2012 09:28:35 -0400 Received: by eekb47 with SMTP id b47so2151027eek.0 for ; Wed, 23 May 2012 06:28:31 -0700 (PDT) In-Reply-To: <87d35vxcuc.wl%ded-law@ddoherty.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Daniel E. Doherty" Cc: Org-mode List Hi Daniel, you need to quote the entire form, i.e. the progn; (eval-after-load 'org '(progn (add-to-list 'org-structure-template-alist '("m" "#+begin_src emacs-lisp\n?\n#+end_src")) (add-to-list 'org-structure-template-alist '("j" = "#+begin_quote\n||Dr|Cr|\n|-\n|?|$||\n|||$|\n#+end_quote")))) This is because the entire form is stored for execution after loading = org - but in your case it was evaluated immediately... - Carsten On May 23, 2012, at 3:10 PM, Daniel E. Doherty wrote: > All, >=20 > I really like the Easy Template facility, and would like to add some = of > my own. However, I am having trouble with the elisp syntax. I would > like to add a couple in my init file, but am having no luck. Here is > what I have now: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > (eval-after-load 'org > (progn > (add-to-list 'org-structure-template-alist > (list '("m" "#+begin_src = emacs-lisp\n?\n#+end_src"))) > (add-to-list 'org-structure-template-alist > (list '("j" = "#+begin_quote\n||Dr|Cr|\n|-\n|?|$||\n|||$|\n#+end_quote"))))) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > Which yeilds: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > Debugger entered--Lisp error: (invalid-function (("j" "#+begin_quote > ||Dr|Cr| > |- > |?|$|| > |||$| > #+end_quote"))) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >=20 >=20 > I have also tried this: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > (eval-after-load 'org > (progn > (add-to-list 'org-structure-template-alist > '("m" "#+begin_src emacs-lisp\n?\n#+end_src")) > (add-to-list 'org-structure-template-alist > '("j" = "#+begin_quote\n||Dr|Cr|\n|-\n|?|$||\n|||$|\n#+end_quote")))) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > Which spits out a similar error. I am quoting the list, so I don't > understand why elisp is interpteting it as a function. In the first > case, I even quote it twice. >=20 > Any help? >=20 > Thanks. >=20 > Dan Doherty >=20 - Carsten