emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Issue with remember templates
@ 2009-12-31 11:56 Francis Moreau
  2010-01-03 13:11 ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Francis Moreau @ 2009-12-31 11:56 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I'd like to note my work's holidays using remember.

For this, I have a org file (work.org for example) which contains the
following headline:

* Holidays
#+CATEGORY: Holiday
%%(diary-date 12 '(4 7) 2009) Day Off

I also created the following template to speed up the process of
entering a new holiday entri:

("Holidays" ?h "* %% (diary-date %?) Day Off" "work.org" "Holidays")

But as you can notice, this doesn't exactly create the entry I
described previously since it does:

* %% (diary-date ) Day Off

I had to insert some spaces otherwise Org tries to evaluate the Elisp
SEXP. I tried to use some backslashes in several ways like
'\%(diary-date )' but it has no effect.

The other problem is that Org ensures that the new entry has a
headline so I had to start the template with '*'. But I don't want
this since I read that the sexp entries must start at the left margin.

Could anybody give me some hints to solve these 2 issues ?

Thanks
-- 
Francis

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

* Re: Issue with remember templates
  2009-12-31 11:56 Issue with remember templates Francis Moreau
@ 2010-01-03 13:11 ` Carsten Dominik
  2010-01-04  8:52   ` Francis Moreau
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2010-01-03 13:11 UTC (permalink / raw)
  To: Francis Moreau; +Cc: emacs-orgmode


On Dec 31, 2009, at 12:56 PM, Francis Moreau wrote:

> Hello,
>
> I'd like to note my work's holidays using remember.
>
> For this, I have a org file (work.org for example) which contains the
> following headline:
>
> * Holidays
> #+CATEGORY: Holiday
> %%(diary-date 12 '(4 7) 2009) Day Off
>
> I also created the following template to speed up the process of
> entering a new holiday entri:
>
> ("Holidays" ?h "* %% (diary-date %?) Day Off" "work.org" "Holidays")
>
> But as you can notice, this doesn't exactly create the entry I
> described previously since it does:
>
> * %% (diary-date ) Day Off
>
> I had to insert some spaces otherwise Org tries to evaluate the Elisp
> SEXP. I tried to use some backslashes in several ways like
> '\%(diary-date )' but it has no effect.

"* %\\%(diary-date %?) Day Off"

should work.

>
> The other problem is that Org ensures that the new entry has a
> headline so I had to start the template with '*'. But I don't want
> this since I read that the sexp entries must start at the left margin.

You can use

("Holidays" ?h "* Day Off <%\\%(diary-date %?)>" "work.org" "Holidays")

HTH

- Carsten


>
> Could anybody give me some hints to solve these 2 issues ?
>
> Thanks
> -- 
> Francis
>
>
> _______________________________________________
> 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

- Carsten

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

* Re: Issue with remember templates
  2010-01-03 13:11 ` Carsten Dominik
@ 2010-01-04  8:52   ` Francis Moreau
  2010-01-04  9:00     ` Carsten Dominik
  0 siblings, 1 reply; 5+ messages in thread
From: Francis Moreau @ 2010-01-04  8:52 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hello,

On Sun, Jan 3, 2010 at 2:11 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> "* %\\%(diary-date %?) Day Off"
>
> should work.
>

Ok,

>>
>> The other problem is that Org ensures that the new entry has a
>> headline so I had to start the template with '*'. But I don't want
>> this since I read that the sexp entries must start at the left margin.
>
> You can use
>
> ("Holidays" ?h "* Day Off <%\\%(diary-date %?)>" "work.org" "Holidays")
>

Hm, well I now have this entry in my agenda view:

TueTuesday     5 January 2010
  Vacation:   Day Off <%%(diary-date 01 5 2010)>

The SEXP is now visible from the view which is not really nice.

Thanks
-- 
Francis

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

* Re: Issue with remember templates
  2010-01-04  8:52   ` Francis Moreau
@ 2010-01-04  9:00     ` Carsten Dominik
  2010-01-04  9:44       ` Francis Moreau
  0 siblings, 1 reply; 5+ messages in thread
From: Carsten Dominik @ 2010-01-04  9:00 UTC (permalink / raw)
  To: Francis Moreau; +Cc: emacs-orgmode


On Jan 4, 2010, at 9:52 AM, Francis Moreau wrote:

> Hello,
>
> On Sun, Jan 3, 2010 at 2:11 PM, Carsten Dominik
> <carsten.dominik@gmail.com> wrote:
>>
>> "* %\\%(diary-date %?) Day Off"
>>
>> should work.
>>
>
> Ok,
>
>>>
>>> The other problem is that Org ensures that the new entry has a
>>> headline so I had to start the template with '*'. But I don't want
>>> this since I read that the sexp entries must start at the left  
>>> margin.
>>
>> You can use
>>
>> ("Holidays" ?h "* Day Off <%\\%(diary-date %?)>" "work.org"  
>> "Holidays")
>>
>
> Hm, well I now have this entry in my agenda view:
>
> TueTuesday     5 January 2010
>  Vacation:   Day Off <%%(diary-date 01 5 2010)>
>
> The SEXP is now visible from the view which is not really nice.

That is right - add a \n before the "<" in your template.

- Carsten

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

* Re: Issue with remember templates
  2010-01-04  9:00     ` Carsten Dominik
@ 2010-01-04  9:44       ` Francis Moreau
  0 siblings, 0 replies; 5+ messages in thread
From: Francis Moreau @ 2010-01-04  9:44 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

On Mon, Jan 4, 2010 at 10:00 AM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>
> On Jan 4, 2010, at 9:52 AM, Francis Moreau wrote:
>
>> Hello,
>>
>> On Sun, Jan 3, 2010 at 2:11 PM, Carsten Dominik
>> <carsten.dominik@gmail.com> wrote:
>>>
>>> "* %\\%(diary-date %?) Day Off"
>>>
>>> should work.
>>>
>>
>> Ok,
>>
>>>>
>>>> The other problem is that Org ensures that the new entry has a
>>>> headline so I had to start the template with '*'. But I don't want
>>>> this since I read that the sexp entries must start at the left margin.
>>>
>>> You can use
>>>
>>> ("Holidays" ?h "* Day Off <%\\%(diary-date %?)>" "work.org" "Holidays")
>>>
>>
>> Hm, well I now have this entry in my agenda view:
>>
>> TueTuesday     5 January 2010
>>  Vacation:   Day Off <%%(diary-date 01 5 2010)>
>>
>> The SEXP is now visible from the view which is not really nice.
>
> That is right - add a \n before the "<" in your template.

Ok, but the "Day off" headline seems a bit 'hackish'.

Is there a more 'traditionnal' way to do this (add vacation in my
agenda) with Org ?

Thanks
-- 
Francis

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

end of thread, other threads:[~2010-01-04  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-31 11:56 Issue with remember templates Francis Moreau
2010-01-03 13:11 ` Carsten Dominik
2010-01-04  8:52   ` Francis Moreau
2010-01-04  9:00     ` Carsten Dominik
2010-01-04  9:44       ` Francis Moreau

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