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, 19 Oct 2024 10:39:59 +0200 Message-ID: <87r08cqye8.fsf@ohm.mail-host-address-is-not-set> References: <87ed4dss2x.fsf@ohm.mail-host-address-is-not-set> <0bacd69a-7941-44d2-ac5e-3ae3f256481a@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10615"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 19 10:40:41 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 1t250q-0002Y8-1p for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Oct 2024 10:40:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t250N-0000g8-1p; Sat, 19 Oct 2024 04:40:11 -0400 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 1t250M-0000fg-8P for emacs-devel@gnu.org; Sat, 19 Oct 2024 04:40:10 -0400 Original-Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t250K-0005po-9p for emacs-devel@gnu.org; Sat, 19 Oct 2024 04:40:09 -0400 Original-Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id 5C83D138022D; Sat, 19 Oct 2024 04:40:07 -0400 (EDT) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Sat, 19 Oct 2024 04:40:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= recursewithless.net; h=cc: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=fm1; t=1729327207; x=1729413607; bh=OfwF50TXXJTgN1ixySbC9YVyJ3Z3Y+EgcX/gMxPUhUs=; b= r4F1ZzoGm29ErllnTT/C1Qo3La6LsikpsuKPcR2RmIajij+3vXWtSBysp49nuSfa uXpHebzzEckiN/d0PKvQxbb9E/VvdUdvCTcMMBNgO9qILe2oacN0Qmz4xZbohEqW ohfcZ8DZicaPklsMEMNV63W0t0ENqlWejfE+KgDhKLJYI9ox12K4yGeOa9EOjeYI L+oH/RRlzhv1afUizNyL1sZ0j1OpZrrvDG1DtlqZ+wY/8a+ROywFqe4UYyjwsREg 5jw4x9hSD+neSa73WRIjWhEwrLIPtZuLOAM25wgicADWXafrXAouCQtTNrOqN7AC SznwSQXfPQDhb1A+hqUz9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1729327207; x=1729413607; bh=OfwF50TXXJTgN1ixySbC9YVyJ3Z3 Y+EgcX/gMxPUhUs=; b=cBW+KTqxCtnP9dz1AsYi0xGrMQSBL+twqLmkMaDFWGRU gw90Hp2bk+35xEM4T2ZJBJxQPw1bU1C8OVngH29LhZLjSkaxMr5imWUF/hmTt6if 9jc7YRqlh/mv6Ls9sah5N+JOizPyeDwJ2XtlOIvg00rRK1ju9RjQ4cPeGRVewq1l 1hx/X3pNI+qkO+LDFu3DYVrkinc7/zEI9IOxKWQVirHKT4Jjv6WNLiFedCn1upXc DHNYlEiufJuQcAjg3Zt+8wuJr/70yFY73740mdPA4lvcSUCyF+qp04Addp0ZMGj6 FofD1oiW0kz+pPIW1e6a4YHn/LhVXAgiV8dePWz7Dg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehhedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehttdertddttddtnecu hfhrohhmpeftihgthhgrrhguucfnrgifrhgvnhgtvgcuoehrfihlsehrvggtuhhrshgvfi hithhhlhgvshhsrdhnvghtqeenucggtffrrghtthgvrhhnpeefueffvdeffeeftdeutdfg jeettdduveduudefjedtkeejgfehhedvgffgffduhfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrfihlsehrvggtuhhrshgvfihithhhlhgv shhsrdhnvghtpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtph htthhopegruggrmhesrghlphhhrghprghprgdrnhgvthdprhgtphhtthhopegvmhgrtghs qdguvghvvghlsehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: if7394488:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 19 Oct 2024 04:40:06 -0400 (EDT) In-Reply-To: <0bacd69a-7941-44d2-ac5e-3ae3f256481a@alphapapa.net> Received-SPF: pass client-ip=103.168.172.146; envelope-from=rwl@recursewithless.net; helo=fout-a3-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:324676 Archived-At: Hi Adam, Adam Porter writes: > I don't have much to add to what's been said, but my first thought is > that a robust iCal library would probably be most useful for importing > and exporting between the iCal format, obviously. So I'd suggest that > its API should help with transforming iCal data into other formats, > probably by converting it into a simple Lisp data structure that other > libraries could work with. And then, it should also provide a function > to transform that data structure back into an iCal file. > > Also, it would be good if it were designed to be extensible in case the > standards receive updates, or in case vendor-specific functionality is > needed by users. Yep, that's exactly the plan! Thanks for confirming that this is a good idea. > So I'd suggest looking at the existing Emacs/Org applications that use > iCal, and designing your API so that such applications would find it > easy to use (not that it should directly imitate what already exists, > unless such APIs are already ideal). Yes, I was hoping especially to hear from Org/Gnus/diary developers if they have any thoughts about what would make such a library easy (or -ier) for them to use. Perhaps I should ask on their respective lists...does Gnus have a separate mailing list? I will also grep through the code to see if anything else in Emacs is using the icalendar--* internal functions. > Finally, I'd suggest that you consider using structs as the primary > internal data structure, because they provide setter and accessor > functions, which are helpful to developers (e.g. they help catch some > mistakes at compilation time). If you do, I've found it helpful to > define an "etc" slot in various structs to which an alist or plist can > be attached, which provides the ability for the structs to carry > additional data that wasn't foreseen during its design. Thanks, that's useful advice. I've been toying with the idea of using EIEIO classes to represent at least the "component"-level data structures (events, to-dos, journals, timezones, whole calendars), which if I understand correctly use structs under the hood. But I don't really have any experience with EIEIO and I'm not sure if the added complexity of the object system will buy much over using plain structs. Do you have any thoughts about this? Best, Richard