emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] individual alerts


From: Nick Dokos
Subject: Re: [O] individual alerts
Date: Wed, 13 Jan 2016 00:30:25 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.1.50 (gnu/linux)

"cschr" <address@hidden> writes:

> Hello
>
> Im a software developer and new to emacs. I want to maintain my calendar 
> appointments in
> orgmode, and define individual alerts for each appointment (which also 
> includes to have no
> alert for some appointments). Using the emacs diary is not enough for me – I 
> want orgmode!
>   
>
> I found out already how to export SCHEDULED and DEADLINE timestamps from 
> orgmode to
> iCalendar VEVENTs, but the VALARM TRIGGERs produced always have the same 
> value (VALARM
> TRIGGER is always “P0DT0H0M0S”). How can I define an individual alert for 
> each appointment
> in ORGMODE, and have the alert values exported as icalendar VALARM TRIGGERs?  
>
> The :APPT_WARNTIME: property in orgmode seems to do nothing, nor does it seem 
> to help if I
> add a “WARNTIME …” text to the orgmode item – this seems to work for emacs 
> diary entries
> only.  
>

There are various constraints on the item in order to get a VALARM: it
has to be a TODO item, it has to have a timestamp with both date and
time in it and the timestamp has to *follow* the properties drawer.

I think this last one is a bug in ox-icalendar.el: when I add a
SCHEDULED timestamp, it gets added right after the headline, pushing
the properties drawer down, and ISTR that that is now the mandated order
of org things, but that seems to break ox-icalendar.el's
ability to find the timestamp.

This was mostly trial-and-error (with just a look or two into the code),
so it might be wrong.

However, the following org file:

--8<---------------cut here---------------start------------->8---
* TODO foo
  :PROPERTIES:
  :APPT_WARNTIME: 10
  :END:
  SCHEDULED: <2016-01-13 Wed 12:00>
  something to do
--8<---------------cut here---------------end--------------->8---

exports to a reasonable-looking ics file:

--8<---------------cut here---------------start------------->8---
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:foo
PRODID:-//Nick Dokos//Emacs with Org mode//EN
X-WR-TIMEZONE:EST
X-WR-CALDESC:
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:20160113T052724Z
UID:TS1-bcc61d9a-6f28-47d1-9e10-710dbe4fed2c
DTSTART:20160113T120000
DTEND:20160113T140000
SUMMARY:foo
DESCRIPTION:SCHEDULED: <2016-01-13 Wed 12:00> something to do
CATEGORIES:foo
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:foo
TRIGGER:-P0DT0H10M0S
END:VALARM
END:VEVENT
END:VCALENDAR
--8<---------------cut here---------------end--------------->8---

whereas the "normal" position of the timestamp:

--8<---------------cut here---------------start------------->8---
* TODO foo
  SCHEDULED: <2016-01-13 Wed 12:00>
  :PROPERTIES:
  :APPT_WARNTIME: 10
  :END:
  something to do
--8<---------------cut here---------------end--------------->8---

leads to a rather sorry-looking ics file:

--8<---------------cut here---------------start------------->8---
BEGIN:VCALENDAR
VERSION:2.0
X-WR-CALNAME:foo
PRODID:-//Nick Dokos//Emacs with Org mode//EN
X-WR-TIMEZONE:EST
X-WR-CALDESC:
CALSCALE:GREGORIAN
END:VCALENDAR
--8<---------------cut here---------------end--------------->8---

-- 
Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]