From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id oOADEom4Z2KExgAAbAwnHQ (envelope-from ) for ; Tue, 26 Apr 2022 11:16:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YAciEom4Z2K+gwEA9RJhRA (envelope-from ) for ; Tue, 26 Apr 2022 11:16:57 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CB1311A1D1 for ; Tue, 26 Apr 2022 11:16:56 +0200 (CEST) Received: from localhost ([::1]:32884 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njHJX-0005s5-MX for larch@yhetil.org; Tue, 26 Apr 2022 05:16:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njH9t-0005iz-Fk for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 05:06:57 -0400 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]:45034) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njH9r-0002jV-RS for emacs-orgmode@gnu.org; Tue, 26 Apr 2022 05:06:57 -0400 Received: by mail-ot1-x32b.google.com with SMTP id i3-20020a056830010300b00605468119c3so12593832otp.11 for ; Tue, 26 Apr 2022 02:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=fOYPiKTxi24K0wJnwMVdPAxg/3jNU17a9S/BNgAKnkg=; b=Yo6RACDCGKdd1lje5KtpL3Wd2elzCOzRYPsicb8LHqAmMCzQhuvV1yjaCGynG4Dkgt G1KhGHWFT1uPJb9Jj3WCFUDj26dlEf0ptaoCuLPrxQazoMcSPa8coDYVIH/zFzo6dL5B PUV1nUt7fcJ+L5ca0jo+hplVr7FD0PKDy7p0XESrNjaHxBxfqTQRZJwTW/QcSKrvXgRu hEAgcirwCIWxGMTFAXqGr7R8DxTSlNtsm2nSxeIJ1m4p1ajz7bjSW0amQEsSL+bGWSEc NUZMXJc1vOgGz89sjb/7sxmD5q85A6SaikxPJ2XLKSvjmqmnAss5gAPUnTRQm/SmjB/T IHoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=fOYPiKTxi24K0wJnwMVdPAxg/3jNU17a9S/BNgAKnkg=; b=azclNcEONPdmeiFyffkU8x2IdmaLJ55F8YyTW8c0fz9E8ryxfCDnSVg192Yjaq6EDn OBA+TQxeVU9Wj9lIbs2qy3mu3AqkdGOdIceS6jlZnelqW7zRcENV0uDhQjCirO3Jzc6F XazCpooIr/uOECFl61ORuPN9cnTqnGo6Db+lDqnNDYxFLQRzls7FflEr/OHtSCeUdgxF LpNH4gHM+Wl5zhhhZdBtD74+SD+Wfz+jZRytkBbyIbhuspd/TkQnb16QUWQPsPudRgEB 6pdyB0JFI8brEAW2zx/7dwNteUzjqDxKtwq4biJ9+8qd/VaJE2kIAleUX0vEqOcD89as v8MA== X-Gm-Message-State: AOAM532EFj37MitZXuakKm+yL38go6KC5WhzJDYDkDzN4Oy6JEQ9lIv/ nZk+o96XMJihcCMxGvK93Qk= X-Google-Smtp-Source: ABdhPJySo5ATds3M+X0U/eqIO8AjDIkrZoDyO/Z/CnQ3mpxCIYHCJDp20qreZdj6y2s3qLrjNTm1qQ== X-Received: by 2002:a05:6830:348f:b0:605:790c:e4c2 with SMTP id c15-20020a056830348f00b00605790ce4c2mr8011074otu.40.1650964014653; Tue, 26 Apr 2022 02:06:54 -0700 (PDT) Received: from localhost ([208.110.84.210]) by smtp.gmail.com with ESMTPSA id s80-20020a4a3b53000000b0033525287876sm5310361oos.2.2022.04.26.02.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 02:06:53 -0700 (PDT) From: Ihor Radchenko To: Max Nikulin Subject: Re: [DRAFT][PATCH v2] org-encode-time compatibility and convenience helper In-Reply-To: References: <7f4ea652-7d22-fb61-f873-5e92f078c9e6@gmail.com> <87mtgcmckj.fsf@localhost> Date: Tue, 26 Apr 2022 17:07:46 +0800 Message-ID: <875ymwus9p.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::32b; envelope-from=yantar92@gmail.com; helo=mail-ot1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 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_ENVFROM_END_DIGIT=0.25, 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-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1650964617; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fOYPiKTxi24K0wJnwMVdPAxg/3jNU17a9S/BNgAKnkg=; b=FvpuZzVX8D/vLHn2q62/xQwkgzCT4rJw54fabb+Ievubc90AVJ09pKSURy3k5VB8LpDxy9 CNx/vFrJAXKBOKNJqZ1eHY9Aj7E8GXtnIoYt2P99EawBn3bCHP02Ow5ZSmWd2n6HeUuafJ DprnQYbKEc8dZvZyBoCMX+xUDRBCSgZlxzUQ1X6zY3cjX+UxQzC1IwbTUTAksxnmUVqQn1 zu5nvz8uAtuFjYTTSA0rGMi4HVSoftm68Z2m8DFgsfC3Lu/Laq/y2EsUUJgdmbcdPGADyi upF2u+xqnMno0vTVmOPHjL9laAZbUzuxaxpsqchHdweHi+cPO8aHAU9/bntK/A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650964617; a=rsa-sha256; cv=none; b=c+y7JlXHRjm1N9T3PmBo2vTwvH2ZvfP3hdka7nZAX5eTrIxo14yDm9aFFSn8Viksz8N791 9DUyvpPZQMkqUaFUzFCXcmHwOmygp+WTfYKtrJ1hBUubZ0mzmetAEKD5jU2E9OOT+kT9xU mPcmqLDPiw6s/uEmOFAryhM+VUtJ7Sh78s/KxZwigDndiBzB/aZbFYTTSpMQ99ZZBgBWer vIX52wDiJROuKJWjWd+0lLIQnmopvhv4cu+4SCdKToAdXe7kGPq4Y8uXUw1RmtAXKFcqVT /08j5ywV2Rdd/T9XxcmvcoYYT0dgF9peywJpnmq8YiAQ55NpV/qst5gVZcOKIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yo6RACDC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.51 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yo6RACDC; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CB1311A1D1 X-Spam-Score: -3.51 X-Migadu-Scanner: scn1.migadu.com X-TUID: ETMpzZ9ZGe26 Max Nikulin writes: >> This whole timezone staff is complex. I got lost in the emacs devel >> discussion half-way through. From point of view of API, I would prefer a >> single function with docstring explaining the necessary caveats. > > To have namely a single function that accepts both a list or multiple > arguments, it is necessary to introduce a new name to Emacs. > `encode-time' has a subtle difference in behavior depending on the > calling style and fixing this issue may break some code. That is why I > decided to offer a macro. I did not mean "single function" to be a function specifically. Macro is perfectly fine. Sorry for the confusion. > I have not figured out which kind of high-level API I would like to have > instead of `encode-time', and I believe, it is acceptable to rely on > default normalization and ambiguity resolution as the status quo. > Problems may happen during 2 days of 365 and people usually expect some > glitches for these days. There are too many caveats to explain them in > docstring. I understand. But, it may be helpful to mention the existence of such caveats, ideally with a link where the user can learn more. > I am attaching an updated version of the draft. I have added a macro for > testing of particular time zones. > From 8fdcca3f3b0cf3e890149eb79ea6c7970b7d2cfa Mon Sep 17 00:00:00 2001 > From: Max Nikulin > Date: Fri, 8 Apr 2022 23:10:50 +0700 > Subject: [PATCH] org-macs.el: Introduce a helper for `encode-time' LGTM. I think you can go ahead and continue with the followup patch making use of the new macro. Best, Ihor