all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jere McDevitt <jere.mcdevitt@gmail.com>
To: Nathan Neff <nathan.neff@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Use environment variable for location of templates?
Date: Fri, 19 Jun 2009 20:19:39 -0400	[thread overview]
Message-ID: <d0897c3b0906191719t5ea533b8w263b50f9b6bf25d9@mail.gmail.com> (raw)
In-Reply-To: <211769420906190939w5b608778oec6d1adb739699e1@mail.gmail.com>


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

I think the issue is that you need to supply a function to be invoked to
create the file name.

I tested your approach and found if you change the line to use a lambda
function

       ("Work Tasks" ?t "* TODO %U %?\n\n  %i\n  %a" (lambda() (concat
org-directory "tasks.org")))

seems to work.  Make sure that your environment variable ends in a / so the
path is constructed correctly.

Jere

On Fri, Jun 19, 2009 at 12:39 PM, Nathan Neff <nathan.neff@gmail.com> wrote:

> Hello,
>
> I'm a beginner at lisp/emacs, and realize this is a basic question.
>
> I would like to use an environment variable WORKDIR to specify the
> directory whereOh, I'm familiar with the file variables and all, thanks for
> the tip.
>
> Since the org-remember code is written to support files that are not in
> org-mode as targets of remember items, it just seemed to me it shouldn't
> then switch back to assuming it was an org mode file simply because the text
> being inserted resembles a particular type of regexp.
> my remember templates are located.
>
> I would like to have a template located in WORKDIR/tasks.org
>
> Using the code below, when I invoke remember-mode and press "t", I get
> the default
> remember template instead of the WORKDIR/tasks.org.
>
> ;; I can get the value of WORKDIR successfully
> (setq org-directory (getenv "WORKDIR"))
>
> (setq org-remember-templates
>      '(
>        ("Personal" ?p "* %U %?\n\n  %i\n  %a" "~/Documents/personal/
> notes.org")
>        ("Work Tasks" ?t "* TODO %U %?\n\n  %i\n  %a" (concat org-directory
> "tasks.org"))
> ))
>
> Any help would be appreciated.
>
> Thanks,
> --Nate
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>

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

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

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

  reply	other threads:[~2009-06-20  0:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 16:39 Use environment variable for location of templates? Nathan Neff
2009-06-20  0:19 ` Jere McDevitt [this message]
2009-06-20  2:47   ` Nick Dokos

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

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

  git send-email \
    --in-reply-to=d0897c3b0906191719t5ea533b8w263b50f9b6bf25d9@mail.gmail.com \
    --to=jere.mcdevitt@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nathan.neff@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.