emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: "Daniel E. Doherty" <ded-law@ddoherty.net>
Cc: Org-mode List <emacs-orgmode@gnu.org>
Subject: Re: Adding Easy Templates
Date: Wed, 23 May 2012 09:29:25 -0400	[thread overview]
Message-ID: <23815.1337779765@alphaville> (raw)
In-Reply-To: Message from Daniel E. Doherty <ded-law@ddoherty.net> of "Wed, 23 May 2012 08:10:19 CDT." <87d35vxcuc.wl%ded-law@ddoherty.net>

Daniel E. Doherty <ded-law@ddoherty.net> wrote:

> I have also tried this:
> =========================
>   (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"))))
> =========================
> 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.
> 

I presume that it spits out the error when you try to *use* the template,
correct? You can add anything you want to org-structure-template-alist, but
if you try to *use* the thing, it'd better have the correct format.

In any case, the above (without the call to ``list'') is the correct
form, but the elements to add are *three*-element lists: (<key>
<standard text> <muse text>). If you don't care about org-mtags (see the
doc for org-structure-template-alist), just add an empty string as the
third element.

Untried but hope it works,
Nick

      parent reply	other threads:[~2012-05-23 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 13:10 Adding Easy Templates Daniel E. Doherty
2012-05-23 13:28 ` Carsten Dominik
2012-05-23 13:35   ` Carsten Dominik
2012-05-23 16:27     ` Daniel E. Doherty
2012-05-23 13:29 ` Nick Dokos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23815.1337779765@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=ded-law@ddoherty.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).