emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-capture-templates : should symbols work as a file target ?
@ 2010-07-05 20:11 Julien Fantin
  2010-07-05 20:22 ` David Maus
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Fantin @ 2010-07-05 20:11 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 1148 bytes --]

Hi folks,

I'v been trying to setup an org-capture template using a symbol as the file
target, but this raises an error.
Someone on IRC mentionned this is probably a bug, but I'm not experienced
enough to be sure I'm not simply misusing it...


Here is the bit of config in question:


* Files
#+BEGIN_SRC emacs-lisp
(setq org-directory  (concat (getenv "HOME") "/org/"))
(setq organizer (concat org-directory "organizer.org"))
#+END_SRC

* Capture
#+BEGIN_SRC emacs-lisp
(setq org-default-notes-files organizer)
#+END_SRC

** Templates
#+BEGIN_SRC emacs-lisp
(setq org-capture-templates
       `(
        ("t" "Task" entry
         (file+headline  organizer "Tasks")
         "* TODO %?\n%U")

        ("j" "Journal" entry
         (file+datetree "~/org/journal.org")
         "* %?\nEntered on %U\n %i\n %a")
        ))
#+END_SRC


Which results in the following message when the first template is selected
 after executing org-capture:

org-find-base-buffer-visiting: Wrong type argument: stringp, organizer

So is this actually a bug ?
If not, could anyone enlighten me as to how I could manage to reuse this
'organizer in the form ?

Cheers !

[-- Attachment #1.2: Type: text/html, Size: 1898 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-capture-templates : should symbols work as a file target ?
  2010-07-05 20:11 org-capture-templates : should symbols work as a file target ? Julien Fantin
@ 2010-07-05 20:22 ` David Maus
  2010-07-09  1:17   ` Glauber Alex Dias Prado
  0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2010-07-05 20:22 UTC (permalink / raw)
  To: Julien Fantin; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 875 bytes --]

Julien Fantin wrote:
>Hi folks,

>I'v been trying to setup an org-capture template using a symbol as the file
>target, but this raises an error.
>Someone on IRC mentionned this is probably a bug, but I'm not experienced
>enough to be sure I'm not simply misusing it...


>Here is the bit of config in question:


>** Templates
>#+BEGIN_SRC emacs-lisp
>(setq org-capture-templates
>       `(
>        ("t" "Task" entry
>         (file+headline  organizer "Tasks")
>         "* TODO %?\n%U")

>        ("j" "Journal" entry
>         (file+datetree "~/org/journal.org")
>         "* %?\nEntered on %U\n %i\n %a")
>        ))
>#+END_SRC

You already backquote the template list so you've just to but the
special marker , (comma) in front of organizer and it gets evaluated.

HTH
  -- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: org-capture-templates : should symbols work as a file target ?
  2010-07-05 20:22 ` David Maus
@ 2010-07-09  1:17   ` Glauber Alex Dias Prado
  0 siblings, 0 replies; 3+ messages in thread
From: Glauber Alex Dias Prado @ 2010-07-09  1:17 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode, Julien Fantin

David Maus <dmaus@ictsoc.de> writes:

> Julien Fantin wrote:
>>Hi folks,
>
>>I'v been trying to setup an org-capture template using a symbol as the file
>>target, but this raises an error.
>>Someone on IRC mentionned this is probably a bug, but I'm not experienced
>>enough to be sure I'm not simply misusing it...

my apologies it was me, and im also not that experienced, nice that you
answered his question.

>
>
>>Here is the bit of config in question:
>
>
>>** Templates
>>#+BEGIN_SRC emacs-lisp
>>(setq org-capture-templates
>>       `(
>>        ("t" "Task" entry
>>         (file+headline  organizer "Tasks")
>>         "* TODO %?\n%U")
>
>>        ("j" "Journal" entry
>>         (file+datetree "~/org/journal.org")
>>         "* %?\nEntered on %U\n %i\n %a")
>>        ))
>>#+END_SRC
>
> You already backquote the template list so you've just to but the
> special marker , (comma) in front of organizer and it gets evaluated.
>
> HTH
>   -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-09  1:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05 20:11 org-capture-templates : should symbols work as a file target ? Julien Fantin
2010-07-05 20:22 ` David Maus
2010-07-09  1:17   ` Glauber Alex Dias Prado

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