Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus window configuration with transient buffers
@ 2013-03-15 10:28 Jan Tatarik
  2013-03-15 13:53 ` Eric S Fraga
  2013-03-15 16:00 ` David Engster
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Tatarik @ 2013-03-15 10:28 UTC (permalink / raw)
  To: ding

Hi,

I wrote a module to sync calendar events received by mail with my
org-mode agenda, and I'm not sure whether mine is the correct way of
plugging the functionality into gnus.

Most invitations I receive these days contain no scheduling information
in the message body itself. What I want to achieve on the gnus side is:

1) When reading an article with calendar part, I want to show an
   additional window containing the calendar event details.

2) The calendar event window should disappear again when jumping to an
   article without invitation part.

The first step is easy, but once an article with invitation is shown,
the additional window stays in place, even for messages without calendar
parts.


So I figured the best way would be to

- delete the event buffer (if any) when loading new article

- create new event buffer when the current article contains calendar part

- force gnus window refresh


I hooked this up as follows:

- in gnus-mark-article-hook (this is the part I'm not so sure about)
  delete the transient event buffer, if any.

- in gnus-article-mime-part-function (again, not sure if this is the
  best place, there's also gnus-article-prepare-hook), detect
  text/calendar parts, parse them and create new buffer containing the
  event details.

- set gnus-always-force-window-configuration to t for the forced window
  configuration refresh. This will make the transient window/buffer
  appear/disappear correctly.


So, my question is, is the above the best way to implement the behavior,
or did I miss some easier approach?



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

end of thread, other threads:[~2013-03-22 14:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-15 10:28 Gnus window configuration with transient buffers Jan Tatarik
2013-03-15 13:53 ` Eric S Fraga
2013-03-15 16:00 ` David Engster
2013-03-15 22:53   ` Jan Tatarik
2013-03-16  3:27     ` Dave Goldberg
2013-03-22 14:50     ` Jan Tatarik

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 NNTP newsgroup(s).