From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.devel Subject: Re: Request to add tomelr package to GNU ELPA Date: Tue, 3 May 2022 12:45:19 -0400 Message-ID: References: <87mtfywqeh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36069"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: =?UTF-8?Q?Jo=C3=A3o_Pedro?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 03 18:53:27 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 1nlvmB-0009EO-D9 for ged-emacs-devel@m.gmane-mx.org; Tue, 03 May 2022 18:53:27 +0200 Original-Received: from localhost ([::1]:58100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlvmA-0007Mk-32 for ged-emacs-devel@m.gmane-mx.org; Tue, 03 May 2022 12:53:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlvex-0006cv-Rq for emacs-devel@gnu.org; Tue, 03 May 2022 12:45:59 -0400 Original-Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]:42522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlvew-0004U5-5v for emacs-devel@gnu.org; Tue, 03 May 2022 12:45:59 -0400 Original-Received: by mail-pj1-x102c.google.com with SMTP id l11-20020a17090a49cb00b001d923a9ca99so2487648pjm.1 for ; Tue, 03 May 2022 09:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=wPL39/j+CB5AklBxKp6LbojQilboOp6ljWz0Xe5pTjs=; b=kYEnL9MQyTSX8d7q731qXK1F1N4AhnUX8riJ21gAFTdcF9EOYVYU+2r2A4E7ekXq3k YSa1/6GMwiILPG0J0xBuLnHgC6hSQzG1LhJwsoeGujQ00nCO8fzg7WkrvHPRW8mESWar YmiKgc99roNCzMw45eSgYMjP8godVIdnJUQFJzIXx7CVxx23AxRqe1Kru5nqzM5Bg7IF emdC8zqGAV1cr32fGFdNFXzkhIXR88J2pLp/a/93B1csPY3cBVjE6dgVu9NCVRYg9o0g k0IFgTnqQkaYLG8uPNbcBBs40TUGoNtA2k1G3T4jDkS97+O/JjYk/eKwuFqgbi5JKBbl P7xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=wPL39/j+CB5AklBxKp6LbojQilboOp6ljWz0Xe5pTjs=; b=IyVDHMiK47NBk9SWT2H2aISZVS74hlWGTFRt6ffB6ApEH98LAP7yv4mvRpioveBMrd mMtIAulYwes9YFksdGWh5HVGNMZG6rcyN3JbKWj9qy6nMgK1lrnJhCurAR2ZoZu0GCDt aCaJCf2O1ZsAzpqe1bjwsfbCun2JcsiSwhgrZ2SNkNAOrLpUxsEzXCYv2GSZ1Rnh/RgP mTrKado2UeLKrS/bMn90z5fqzfWa/lXWMc9HmoLdNJCc3r1SoBuqOEj0aCJnRXOycho4 o3RjYO0fvWBxmf+0h+HFkES6ufv62F3MIBEsBZsBPZfjntPBtug6Bjxuv32Lw8wt4mKO ZVlg== X-Gm-Message-State: AOAM5310Bfa+dmVuhXrvrwPQyy9PjqSjU3eE7nxV/pqltEBxXWRK3weg 9gxXfpZlULmhueVXK6scT0YOM8AYtQliJDAB85E= X-Google-Smtp-Source: ABdhPJwZHkI/wPAFmZrFr0Ciw+nGphFhrmW8wWQ1xzcjzh+UtO+7fRXkQjmaYGcrH4Db2LuyvsCPYFUY/KIRqWFC2TA= X-Received: by 2002:a17:90b:3e84:b0:1dc:5942:af0e with SMTP id rj4-20020a17090b3e8400b001dc5942af0emr5616856pjb.61.1651596356468; Tue, 03 May 2022 09:45:56 -0700 (PDT) In-Reply-To: <87mtfywqeh.fsf@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::102c; envelope-from=kaushal.modi@gmail.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:289112 Archived-At: Hi Jo=C3=A3o , Thanks for the feedback. On Tue, May 3, 2022 at 12:07 PM Jo=C3=A3o Pedro = 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/c24ea792484598ffd2f8e786fadb823= d48c8ec12/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