emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Dynamically creating capture mode templates
@ 2015-10-09 18:34 tenspd137 .
  0 siblings, 0 replies; only message in thread
From: tenspd137 . @ 2015-10-09 18:34 UTC (permalink / raw)
  To: emacs-orgmode

Hi all -

I was hoping someone could help me figure this out.  I have the
following in a .el file I am loading to create keys for my projects:

(setq projects '("Aa" "Bb" "Cc" "Dd")

(let (firstLetter)
  (dolist (project projects firstLetter)
    (setq firstLetter (substring project 0 1))
    (message "%s" firstLetter)
    (setq org-capture-templates
          (append org-capture-templates
                  '((firstLetter project)
                    ((concat firstLetter "t") "Todo" entry
(file+headline (concat org-directory "/default.org") project) "* TODO
%?"))))))

C-n (to activate capture mode)

org-mks: Wrong type argument: sequencep, firstLetter


but in the messages window, it prints the firstLetter variable -
shouldn't firstLetter be a string or char?

Anyway, I can't seem to get this to work - could anyone give me some
insight as to what I am missing?

Thanks!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-09 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 18:34 Dynamically creating capture mode templates tenspd137 .

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).