From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Lawrence Newsgroups: gmane.emacs.devel Subject: Re: Improving Emacs' iCalendar support Date: Sat, 23 Nov 2024 09:44:47 +0100 Message-ID: <87mshq9w5c.fsf@ohm.mail-host-address-is-not-set> References: <87ed4dss2x.fsf@ohm.mail-host-address-is-not-set> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="332"; 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 Sat Nov 23 09:45:52 2024 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 1tElm3-000AWq-FN for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Nov 2024 09:45:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEllF-0006tB-Nv; Sat, 23 Nov 2024 03:45:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEllE-0006sw-2P for emacs-devel@gnu.org; Sat, 23 Nov 2024 03:45:00 -0500 Original-Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEllC-0006Va-05 for emacs-devel@gnu.org; Sat, 23 Nov 2024 03:44:59 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 7FCBD1140174 for ; Sat, 23 Nov 2024 03:44:55 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Sat, 23 Nov 2024 03:44:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= recursewithless.net; h=cc:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1732351495; x=1732437895; bh=Q2zXoRgxZ+GJdzO4F4JwHE2q7pJPSAliL8NilS1+ZRI=; b= rnFAL8cHMcxHD8R8c4XNhvZVLxVusRFHMff3dbqVsaJ9RGDK0onUGZnnwFzfhO2P CW+lUCPMncgVdFZBT6/DyJ0fgbXlhgDcaeSAzOwnVhcykh5g9zCEuECQkT/xdHuP Jk24g2V2dnmMKOrS/9SwwkBAINBa96xwaE0o1Kz6ZnZJhlfVUUOBvNc7DQHammU5 NTLHkaSwAyJnh1WFzfwCsksuYWHFrPemi0zdz/e+iO32KZMX90MO4nCl6qSzTbR1 B4rnTikJCwbYjHRjmFf6H2B+gmGaI4KahTKr6X7SpbZ1pytghaMD+kDEt8Gh+M1J iS1BXiAc6qKz2PbCTFoOwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1732351495; x=1732437895; bh=Q2zXoRgxZ+GJdzO4F4JwHE2q7pJPSAliL8N ilS1+ZRI=; b=DPszwmBj5z7MZ0hqNNopvuyJ/yj/kkewya0xQLcZj/FJr7Psvgw s8q2ChFr0yHH/BQIm2Yh4lW5i4f3YefiRL91NIULfT6+gjrrCgnGMyi78a2rNEmE 3Ksq339q1UJg8VgSjUZmX9kZhK8cVHViNvQJC6CxwDC8mAEcIq0Ouw1l/QDBiuha GFgKe1yHpvM1WRiHmv0KbTkqz5Is3ZmAzKAfw71S1+5vMBUYWnJvJjd2ivfpnvMn chYAiLG2LJUpkWKisctLmaxNk0Vzmpw1kCwrfar84pHm3FUJiSlp7pv3K2gBgbr1 IQt6+vRyt5SU+bLVNJNFGn5IiMOxIidXYwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgedtgdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffujg hffffkgggtsehttdertddttddtnecuhfhrohhmpeftihgthhgrrhguucfnrgifrhgvnhgt vgcuoehrfihlsehrvggtuhhrshgvfihithhhlhgvshhsrdhnvghtqeenucggtffrrghtth gvrhhnpedvueeujedthfejkefhudehfeethfeiieeutddtudejueehhfetkeefhfdtiedu jeenucffohhmrghinhepshhrrdhhthenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehrfihlsehrvggtuhhrshgvfihithhhlhgvshhsrdhnvght pdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvmh grtghsqdguvghvvghlsehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: if7394488:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Sat, 23 Nov 2024 03:44:54 -0500 (EST) In-Reply-To: <87ed4dss2x.fsf@ohm.mail-host-address-is-not-set> Received-SPF: pass client-ip=103.168.172.155; envelope-from=rwl@recursewithless.net; helo=fhigh-a4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325608 Archived-At: Dear emacs-devel, Richard Lawrence writes: > I would like to start a discussion about improving Emacs' iCalendar > support, beyond what is already available in icalendar.el. I personally > would like to see Emacs gain a more full-fledged RFC5545 implementation > that is primarily designed as a library for other applications to use. Time for an update about this: I've been working steadily on the parser, and I reached an important milestone this week: the parser can now parse and reproduce all the examples in RFC5545, as well as my own calendar data! There is still a lot of work to do, but this seems like a good moment to ask again for feedback from anyone who's interested. The repository where I've been doing this work is here: https://sr.ht/~wyleyr/icalendar-el/ There are some instructions in the README for how to get started playing around with the parser, for those interested in trying it out. Based on the feedback I got earlier, I've made a few important design decisions at this stage: 1) The basic form of the syntax tree is based on the format of the Org parse tree in org-element-ast.el (though for now I have not implemented any of the performance optimizations). Syntax nodes are a four-element list of a type symbol, a metadata structure, a value, and a list of children. Type symbols are used to store metadata about all the iCalendar grammar categories and to do type-based dispatch in the parser. 2) As far as possible, I have represented iCalendar data using "native" data types in Emacs: dates are represented as calendar.el dates, date-times as decoded-times, text as strings or buffer regions, etc. This should hopefully make it as easy as possible to use iCalendar data and parse trees from elsewhere in Emacs. In cases where no data type already exists, the data types I defined are usually simple lists with accessors defined for different fields. (My initial attempts used cl-structs for the data types, following Adam Porter's suggestion, but I quickly found myself writing tons of boilerplate to convert between these structs and the "native" formats, so I abandoned it. I am using a struct for syntactic metadata stored by the parser, though.) 3) I have focused a lot on making good documentation, since I think Emacs' documentation system is one of its best features, and the lack of documentation in icalendar.el is one of the things that makes it difficult to work with. All the symbols in the library should have good documentation available via M-x describe-symbol -- please let me know if you find anything confusing or broken in these docs. Many thanks in advance for your thoughts! Best, Richard