emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request to add tomelr package to GNU ELPA


From: Kaushal Modi
Subject: Re: Request to add tomelr package to GNU ELPA
Date: Tue, 3 May 2022 12:45:19 -0400

Hi João ,

Thanks for the feedback.

On Tue, May 3, 2022 at 12:07 PM João Pedro <jpedrodeamorim@gmail.com> wrote:
> It looks great, thanks for the contribution. I've only got one
> suggestion, if I may.
>
> >   (date . 2022-03-14T01:49:00-04:00) ;RFC 3339 date format
>
> Instead of relying only on the RFC 3339 date format, couldn't you also
> use Emacs' internal time representation as well?

I have special treatment for RFC 3339 because that's the only
date/time format recognized by TOML:
https://toml.io/en/v1.0.0#offset-date-time

I am expecting the elisp code using tomelr to provide it with the RFC
3339 formatted date/time string or symbol.

> There is a quite robust
> system for time manipulation in Emacs, below are some documentations for
> it.

Yes, I am using some of that to convert Org inserted date/time info to
RFC 3339 in ox-hugo here:
https://github.com/kaushalmodi/ox-hugo/blob/c24ea792484598ffd2f8e786fadb823d48c8ec12/ox-hugo.el#L1267-L1368
.
ox-hugo will then hand off that RFC 3339 formatted date/time to tomelr.

As you can see, that code is quite involved and I am not sure that
this library is the place for converting Emacs time to RFC 3339.
(Also, I briefly looked for it.. but I couldn't find something
analogous to timep that I can use to auto-convert that info to RFC
3339 that TOML needs.)


Kaushal



reply via email to

[Prev in Thread] Current Thread [Next in Thread]