Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Displaying text/calendar (VCALENDAR) parts?

164 views
Skip to first unread message

Adam Sjøgren

unread,
Sep 29, 2011, 2:12:41 PM9/29/11
to info-gnu...@gnu.org
Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
nicely?

Reading them "raw" isn't that appealing (too many fields, don't know
what to look for...)

How would you go about displaying them "nicely"? Picking out some
fields, formatting it somehow?

Something like:

,---------------------------------------------------.
| When: ... |
| Where: ... |
| Participants: |
| * NN1 <n...@example.com> (organizer) |
| * NN2 <n...@example.com> |
| * NN3 <n...@example.com> |
| * NN4 <n...@example.com> (optional) |
| |
| [Description...] |
`---------------------------------------------------'

Perhaps?


The next step would be to be able to generate the right kinds of emails
to send back to accept/decline a meeting etc., but that's probably
another story...


Best regards,

Adam

--
"Soon we'll have spent a whole month at sea, Adam Sjøgren
splitting atoms for no apparent reason" as...@koldfront.dk


Carson Chittom

unread,
Sep 30, 2011, 8:09:28 AM9/30/11
to
as...@koldfront.dk (Adam Sjøgren) writes:

> The next step would be to be able to generate the right kinds of emails
> to send back to accept/decline a meeting etc., but that's probably
> another story...

If anyone implements this in an easy, no-twiddling-required way, I'll be
forever in your debt---since having this feature will mean I never have
to start up the monstrosity that is Microsoft Outlook. And if you implement
it in a way that integrates with org-mode, you'll be a god among men.

I can't help in writing the code, but I'll be glad to stress test
anything you've got.

--
http://www.wistly.net

Leonidas Tsampros

unread,
Oct 4, 2011, 1:48:51 AM10/4/11
to info-gnu...@gnu.org
as...@koldfront.dk (Adam Sjøgren) writes:
> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
> nicely?
>
> Reading them "raw" isn't that appealing (too many fields, don't know
> what to look for...)
>
> How would you go about displaying them "nicely"? Picking out some
> fields, formatting it somehow?
>
> Something like:
>
> ,---------------------------------------------------.
> | When: ... |
> | Where: ... |
> | Participants: |
> | * NN1 <n...@example.com> (organizer) |
> | * NN2 <n...@example.com> |
> | * NN3 <n...@example.com> |
> | * NN4 <n...@example.com> (optional) |
> | |
> | [Description...] |
> `---------------------------------------------------'
>
> Perhaps?
>
>
> The next step would be to be able to generate the right kinds of emails
> to send back to accept/decline a meeting etc., but that's probably
> another story...
>
>
> Best regards,
>
> Adam

Hi Adam,

I was longing for some support on appointments. I saw your mail and did
a little research and I came up with this:

http://www.gnu.org/software/libtool/manual/emacs/Importing-Diary.html

It seems that the standard diary included in emacs has this
functionality. I'll give it a shot later in the day but this is probably
where I would start.

Best Regards,
Leonidas Tsampros

Lars Magne Ingebrigtsen

unread,
Oct 6, 2011, 4:19:25 PM10/6/11
to Adam Sjøgren, info-gnu...@gnu.org
as...@koldfront.dk (Adam Sjøgren) writes:

> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
> nicely?

Is that a standard data format? If so, you'd think someone would have
written something to display them in Emacs?

--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/

David Engster

unread,
Oct 6, 2011, 4:36:27 PM10/6/11
to info-gnu...@gnu.org
Lars Magne Ingebrigtsen writes:
> as...@koldfront.dk (Adam Sjøgren) writes:
>
>> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
>> nicely?
>
> Is that a standard data format?

More or less, yes.

> If so, you'd think someone would have written something to display
> them in Emacs?

I'm using this to import such things into my org agenda:

http://ozymandias.dk/emacs/org-import-calendar.el

-David


Adam Sjøgren

unread,
Oct 6, 2011, 4:43:39 PM10/6/11
to info-gnu...@gnu.org
On Thu, 06 Oct 2011 22:19:25 +0200, Lars wrote:

> as...@koldfront.dk (Adam Sjøgren) writes:

>> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
>> nicely?

> Is that a standard data format?

I think it is; something like rfc2445 seems to be it.

> If so, you'd think someone would have written something to display
> them in Emacs?

And put it into Gnus!


:-),

Adam

--
"[...] but beyond that the Fry household had as much Adam Sjøgren
interest or understanding of sport as a potato has of as...@koldfront.dk
Riemann's zeta function."


Lars Magne Ingebrigtsen

unread,
Oct 6, 2011, 4:55:05 PM10/6/11
to David Engster, info-gnu...@gnu.org
David Engster <de...@randomsample.de> writes:

> I'm using this to import such things into my org agenda:
>
> http://ozymandias.dk/emacs/org-import-calendar.el

Nice. Is this going to be part of Org?

David Engster

unread,
Oct 6, 2011, 5:09:40 PM10/6/11
to info-gnu...@gnu.org
Lars Magne Ingebrigtsen writes:

> David Engster <de...@randomsample.de> writes:
>
>> I'm using this to import such things into my org agenda:
>>
>> http://ozymandias.dk/emacs/org-import-calendar.el
>
> Nice. Is this going to be part of Org?

Not that I know of.

-David


Timo Myyrä

unread,
Oct 7, 2011, 12:21:54 AM10/7/11
to info-gnu...@gnu.org
Lars Magne Ingebrigtsen <la...@gnus.org> writes:

> as...@koldfront.dk (Adam Sjøgren) writes:
>
>> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
>> nicely?
>
> Is that a standard data format? If so, you'd think someone would have
> written something to display them in Emacs?

vCalendar is the older format which is superceded by iCalendar IIRC.

Emacs includes lisp/calendar/icalendar.el to parse the iCalendar
formats.

It could be used to apply some special formatting by default for
calendar invitations and such. Perhaps adding some nice mime-handling
function for text/calendar parts of messages automatically.

A feature I miss most in Gnus is the lack of appointment handling. I'd
like to have some simple interface to reply to appointments, make new
appointments and perhaps poll all appointments from central server.

I was planning to take a look at icalendar.el and then make some
additions for appointment handling for gnus so I wouldn't have to deal
with groupwise client.

Timo





Leonidas Tsampros

unread,
Oct 7, 2011, 2:46:53 AM10/7/11
to info-gnu...@gnu.org
Lars Magne Ingebrigtsen <la...@gnus.org> writes:
> as...@koldfront.dk (Adam Sjøgren) writes:
>
>> Does anyone have a recipe for displaying text/calendar (VCALENDAR) parts
>> nicely?
>
> Is that a standard data format? If so, you'd think someone would have
> written something to display them in Emacs?

Hi Lars,

I took up the task and made a sample configuration snippet on how I
imagine rendering text/calendar mime parts. It's very crude but you get
the idea. There are some things missing however I'm planning to improve
it real soon adding some font locking, extra information from vcalendar
invitation.

The below snippet has been tested with both an Outlook generated meeting
request and a Google Calendar one.

My real target is to be able to response to these messages too in the
appropriate way (Accept/Reject etc).

Anyway here you go:

(add-to-list 'mm-inlined-types "text/calendar")
(add-to-list 'mm-automatic-display "text/calendar")
(add-to-list 'mm-inline-media-tests '("text/calendar" mm-inline-text-calendar identity))

(require 'icalendar)
(require 'boxquote)

(add-to-list 'mm-inlined-types "text/calendar")
(add-to-list 'mm-automatic-display "text/calendar")
(add-to-list 'mm-inline-media-tests '("text/calendar" mm-inline-text-calendar identity))

(require 'icalendar)
(require 'boxquote)

(defun mm-inline-text-calendar (handle)
(with-temp-buffer
(mm-insert-part handle)
(save-window-excursion
(setq text (lala (icalendar--read-element nil nil)))))
(boxquote-text text)
(mm-insert-inline handle "\n"))

(defun lala (temp)
(setq elems '(ORGANIZER ATTENDEE SUMMARY)
e (car (icalendar--all-events temp)))
(let (value)
(dolist (el elems)
(setq value (format (concat "%s:%s\n" value)
el
(icalendar--get-event-property e el))))
value))


Leo

unread,
Oct 7, 2011, 4:36:20 AM10/7/11
to info-gnu...@gnu.org
On 2011-10-07 14:46 +0800, Leonidas Tsampros wrote:
>> Is that a standard data format? If so, you'd think someone would have
>> written something to display them in Emacs?

I think it is more important to allow users to add them to their emacs
diary. i.e. it would be nice if Gnus can display the summary of the
invitation with button: [Accept] and [Refuse], and when it is accepted
add the event to diary.

Leo


Leonidas Tsampros

unread,
Oct 7, 2011, 5:24:39 AM10/7/11
to info-gnu...@gnu.org
I agree. Upon accepting an event that should be added either to an org
or diary file. That should be customizable by the user.

Bastien

unread,
Oct 7, 2011, 9:16:38 AM10/7/11
to Lars Magne Ingebrigtsen, info-gnu...@gnu.org, David Engster
Lars Magne Ingebrigtsen <la...@gnus.org> writes:

> David Engster <de...@randomsample.de> writes:
>
>> I'm using this to import such things into my org agenda:
>>
>> http://ozymandias.dk/emacs/org-import-calendar.el
>
> Nice. Is this going to be part of Org?

I've just asked Vagn J. his permission for integrating this
into Org's contrib/ directory. Then we can rework it to make
it part of Org's core.

I'll let you know about Vagn answer.

--
Bastien

Lars Magne Ingebrigtsen

unread,
Nov 3, 2011, 5:40:00 PM11/3/11
to info-gnu...@gnu.org
Leonidas Tsampros <ltsa...@upnet.gr> writes:

> I took up the task and made a sample configuration snippet on how I
> imagine rendering text/calendar mime parts. It's very crude but you get
> the idea. There are some things missing however I'm planning to improve
> it real soon adding some font locking, extra information from vcalendar
> invitation.

Looks good. If you finish it, and are willing to assign copyright
assignments for the FSF, we could include this in the next Gnus version.

Ted Zlatanov

unread,
Jan 11, 2012, 11:59:56 AM1/11/12
to
On Thu, 03 Nov 2011 22:40:00 +0100 Lars Magne Ingebrigtsen <la...@gnus.org> wrote:

LMI> Leonidas Tsampros <ltsa...@upnet.gr> writes:
>> I took up the task and made a sample configuration snippet on how I
>> imagine rendering text/calendar mime parts. It's very crude but you get
>> the idea. There are some things missing however I'm planning to improve
>> it real soon adding some font locking, extra information from vcalendar
>> invitation.

LMI> Looks good. If you finish it, and are willing to assign copyright
LMI> assignments for the FSF, we could include this in the next Gnus version.

Any news on this? If Leonidas is not able to assign the copyright, I
can reimplement his idea.

Ted

Lars Ingebrigtsen

unread,
Jan 27, 2012, 1:08:37 PM1/27/12
to
Ted Zlatanov <t...@lifelogs.com> writes:

> LMI> Looks good. If you finish it, and are willing to assign copyright
> LMI> assignments for the FSF, we could include this in the next Gnus version.
>
> Any news on this? If Leonidas is not able to assign the copyright, I
> can reimplement his idea.

I can't recall getting a response from Leonidas, but then again, my
memory isn't all that... reliable...

--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Sent from my Rome
0 new messages