unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ical feeds for diary: why does icalendar.el always import to a file?
@ 2022-02-10 12:15 Hugo Heagren
  2022-02-20 20:36 ` Ulf Jasper
  0 siblings, 1 reply; 2+ messages in thread
From: Hugo Heagren @ 2022-02-10 12:15 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1028 bytes --]

I use the emacs diary a lot, and have recently had to start using
several centralised online calendars, which provide ical feeds (for
work). It's on the todo list in icalendar.el (line 92) to allow
including these in the diary in the same manner as including other
files.

I had a look at implementing this, and it doesn't seem terribly
difficult. The problem is that all the functions for importing ical
data to the diary format (which is what the calendar, the diary and
org-mode all understand) write it to a file by default. So to include
a feed, one has to retrieve the feed into a buffer, import the current
(ical) buffer into a diary file, then include the diary file. This
works, but it seems expensive to write to disk only in order to
(immediately!) read again. It seems to me that it would be easier to
just import the data into a buffer and keep it there. Does anyone if
there was an original reason /not/ to do this?

Given an answer either way, I'll try to work up a patch with the right
method.

Blue skies, Hugo

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

* Re: ical feeds for diary: why does icalendar.el always import to a file?
  2022-02-10 12:15 ical feeds for diary: why does icalendar.el always import to a file? Hugo Heagren
@ 2022-02-20 20:36 ` Ulf Jasper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Jasper @ 2022-02-20 20:36 UTC (permalink / raw)
  To: Hugo Heagren; +Cc: emacs-devel

Am 10.02.2022 um 12:15 (+0000) schrieb Hugo Heagren:

> It seems to me that it would be easier to just import the data into a
> buffer and keep it there. Does anyone if there was an original reason
> /not/ to do this?

IIRC the original reason that icalendar.el offers import to file only
was that it appeared to be sufficient.  It simply looked as if there was
no need to import to buffers.  If there is a use case that works better
with a buffer instead of a file then that is a good reason to add that
functionality.

Best,
ulf




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

end of thread, other threads:[~2022-02-20 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10 12:15 ical feeds for diary: why does icalendar.el always import to a file? Hugo Heagren
2022-02-20 20:36 ` Ulf Jasper

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).