Subject: bug#74994: Improve Emacs iCalendar support

From: Eli Zaretskii <[email-masked]>
Date: Wed, 22 Jan 2025 16:25:25 +0200

> From: Richard Lawrence <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 22 Jan 2025 08:03:59 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Richard Lawrence <[email-masked]>
> 
> >> I've been thinking it would make sense eventually to:
> >>   - rename icalendar.el to something like diary-icalendar.el
> >>   - rewrite the code there to use the new parser in icalendar-parser.el
> >>   - rename the user-facing functions
> >>     (icalendar-{import/export}-file and their variants)
> >>     to make clear that they are diary-specific
> >>   - delete(?)/deprecate the old parsing code
> >
> > I'd prefer to do this without renaming the old file.  That is, rename
> > your new implementation to, say, icalendar2.el.  The rest of your plan
> > sounds good to me.
> 
> Is this more about maintaining the source history, or about not wanting
> to break the setups of people who have (require 'icalendar) or similar
> in their configuration?

The former.  As good as current VCS forensic tools are, some of the
relevant VCS commands still don't work across renames.  So it is
preferable to rename only when necessary.

> So far, all my new code lives in files with names like
> icalendar-parser.el and there is no contention for the name
> icalendar.el.
> 
> My thought was that icalendar.el could/should primarily serve as a
> top-level module for the library, require-ing all the new modules
> itself, so that users of the library can just (require 'icalendar) and
> not have to worry about how the code is organized.
> 
> My reason for "renaming" was simply to move the existing diary-specific
> parts of icalendar.el (which is most of the file) to diary-icalendar.el,
> to be consistent with gnus-icalendar.el in Gnus, ox-icalendar.el in Org,
> and the organization of the other new files.

If there's a lot of stuff to be moved out of the file, I think it's
better to leave the file alone, and instead start new files (as you
have evidently done).