From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hugo Heagren Newsgroups: gmane.emacs.devel Subject: ical feeds for diary: why does icalendar.el always import to a file? Date: Thu, 10 Feb 2022 12:15:46 +0000 Message-ID: <87bkzej4st.fsf@heagren.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19110"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 10 14:45:25 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nI9lD-0004il-FZ for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Feb 2022 14:45:24 +0100 Original-Received: from localhost ([::1]:37440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nI9lB-0002uA-Pu for ged-emacs-devel@m.gmane-mx.org; Thu, 10 Feb 2022 08:45:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI8eV-0002Tf-4A for emacs-devel@gnu.org; Thu, 10 Feb 2022 07:34:23 -0500 Original-Received: from [2a01:c0:2:6:225:90ff:fed2:2b47] (port=60950 helo=mail.oa5.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nI8eQ-0004v2-ST for emacs-devel@gnu.org; Thu, 10 Feb 2022 07:34:22 -0500 Original-Received: from hugoLaptop (localhost.localdomain [127.0.0.1]) hugo@heagren.com (authenticated bits=0) by mail.oa5.com (8.14.4/8.12.11) with ESMTP id 21ACCaYf012035 sender hugo@heagren.com for ; Thu, 10 Feb 2022 12:12:38 GMT DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=heagren.com; h= Message-ID:From:Subject:Date:To:MIME-Version:Content-Type; s= 202202; bh=rmlgRVyYLVFW3nWubJ0UqebAtOE=; b=RkM8d5m+7vviE0GulS4NB TmPeqfZ2uN3/eraNLEQcK3N3Z+Lwfnk8/SvdWHYcCJwcHvRsAc8KZhO4YA8BrZ1p qyhYLMS7TDPwt5VJVvcWYwalWSlbKyqGHOoFrmKn9Hz2Bbq0Lt8FTOxWox/fBcY6 kcTga94W8+rQB3LuDTCOUA/XE5p9dftSNwtz5MGwCa/98oNfSe6HEO0OoGmzvLlY VWxDe8V9qx0LiaWmKcdVmODEQaxBKG+sdXk7AxH7u89 X-Assp-Version: 2.6.5(21218) on ASSP.OA5.COM X-Assp-ID: ASSP.OA5.COM X-Assp-Session: 7F1AA7AB9330 (mail 1) X-Assp-Envelope-From: hugo@heagren.com X-Assp-Intended-For: emacs-devel@gnu.org X-Assp-Client-TLS: yes Original-Received: from global-5-156.nat-2.net.cam.ac.uk ([131.111.5.156] helo=hugoLaptop) by ASSP.OA5.COM with SMTPSA(TLSv1_2 ECDHE-RSA-AES128-GCM-SHA256) (2.6.5); 10 Feb 2022 12:12:36 +0000 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:c0:2:6:225:90ff:fed2:2b47 (failed) Received-SPF: pass client-ip=2a01:c0:2:6:225:90ff:fed2:2b47; envelope-from=hugo@heagren.com; helo=mail.oa5.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286135 Archived-At: --=-=-= Content-Type: text/plain Content-Disposition: inline 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 --=-=-=--