From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wAsdNSTBWGPxrQAAbAwnHQ (envelope-from ) for ; Wed, 26 Oct 2022 07:09:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aGrfNCTBWGP5CAAAauVa8A (envelope-from ) for ; Wed, 26 Oct 2022 07:09:56 +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 704BA178EC for ; Wed, 26 Oct 2022 07:09:56 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1onYdm-00046J-7G; Wed, 26 Oct 2022 01:07:46 -0400 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 1onYdl-00042e-3K for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 01:07:45 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1onYdj-0000fz-GY for emacs-orgmode@gnu.org; Wed, 26 Oct 2022 01:07:44 -0400 Received: by mail-pl1-x632.google.com with SMTP id y4so12993135plb.2 for ; Tue, 25 Oct 2022 22:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=WGSQotfoLKfluPgaJb149jDgCAr70pvvOuNfKShR67k=; b=YsV8OZUnQa2a6c+pIWMdXAv6cax/NVtvLju+lhqZfdraeEQJ7LBAThFvCfmAV9ptrs 3EcX15M6ekMh3Le6hDGwG2u1oMyfGQ4afPgonkxiM8emJ8flmz7HTJTt7YtV67XZPYIV cDdcVvwE3vTx0qmg9VWghjAfqVZeoA4BdvJkCc0G+o7TkTM30kK+MZx8MEe14YRms+1I 4mnPYmTfF/IAsdtPbgvWTOkSLGo8F/s1Juzm1Dx23cFgXGmKIAW9lYMbdWLcbFXBOxN2 iP3t2ON12hfNu134IyeYwuhkjDAqlU2adrUdNKMmbav0LPyC3o3qPPXoM2LdMIpx8s9H L9xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WGSQotfoLKfluPgaJb149jDgCAr70pvvOuNfKShR67k=; b=OIoiVQ7MtRiruhr5XPmVEbvRzYv7M502uUj5M1OFX0/qIuqPqePP8A+dte1seP9f7j aNdGfZWL1yQp6vLQP0rkMqpQaebfy55hyl9XFhiIhikbQ0v2aEgp9t+yOAEeLKASC24l uGTPNqbp/QF2OVATFQmKHFr5t0hhxBVaKx3SeFOsTIt/gNZvS3dZL8N8ZdllZAxL/rvh LuRoYc5MdM7NFWfuLZWm/XfMswJcB/f79YnaaEVOO51/l1XhspgljPRGiD4Rqy4t7A0V VjaqP+sev4DBC9XQy4uNPMWsAcGm2/aTsB8ZAhPVF0cojm0BRn9t/DrcOampgaQV5Tt/ Ubug== X-Gm-Message-State: ACrzQf3DSQYYhAoEceN2m0Nrjs7V5cdeTdpfWs9BCq6OEL7KBsdZYRZL UMuXam7hlck9ZyLmud0akxS/eQ4ir0g= X-Google-Smtp-Source: AMsMyM4Y0PITkCwp3RKlgqAJZtRl9PkAwcH/5ZF+LRbeQnzsIzQPOqSDNxearnljPHBIUtgHGtVN5A== X-Received: by 2002:a17:90b:1808:b0:20d:4e7f:5f53 with SMTP id lw8-20020a17090b180800b0020d4e7f5f53mr2156529pjb.170.1666760861609; Tue, 25 Oct 2022 22:07:41 -0700 (PDT) Received: from dingbat (220-235-181-183.dyn.iinet.net.au. [220.235.181.183]) by smtp.gmail.com with ESMTPSA id e21-20020a635015000000b004582e25a595sm2071333pgb.41.2022.10.25.22.07.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Oct 2022 22:07:41 -0700 (PDT) References: <87zgdms2lq.fsf@mat.ucm.es> <87k04ppp1t.fsf@localhost> <861qqwk778.fsf@gmail.com> <87r0yvql3k.fsf@localhost> User-agent: mu4e 1.9.1; emacs 29.0.50 From: Tim Cross To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] Undocumented convention for org-time-stamp-custom-formats to be "<...>" (was: time-stamp in DONE tag is not really displayed) Date: Wed, 26 Oct 2022 16:06:44 +1100 In-reply-to: <87r0yvql3k.fsf@localhost> Message-ID: <867d0nmaud.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x632.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 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666760996; 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=WGSQotfoLKfluPgaJb149jDgCAr70pvvOuNfKShR67k=; b=N4JruCQQMGmeFzCCzkjhwz2N1QQyLNMvvHWeu/JNiqHaGFC7bOm5I3nzyIZZ6a/MBvGfjb ANmz/7teTQel6eKTP2LDFAi2M5ApOdsljXel5LvxUcPlkbAYQ8+Ellbg0N5TY7rZULHrUU TvIu25ISMwkVGzrs9PzIF3m9OBAs2HXdy7aB3dxsJm1D8rWIKd9dfHnG/d5LXxxQbkQ+LD dbasueU2RmRsTTPlFdlk283Tflmm1sG3URzYJc5n+RRHKxgQk8nBouDSj5S619UvqcPdmJ 4YSkn8oHTy8/3P5y2GouDS76gJOmZiBGRF7WVTeY8mhVpQzNqBQYFhAnwh3Ykw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666760996; a=rsa-sha256; cv=none; b=azFLe+xbbDjnVSfV7Dl9c2ZXQK5QWCd136yPPSbFKtmUB3AslB43CppH8Fb/8NtgU6ApCn +V136O6rWQaNVFY3VNcsx2rdb559qXxqTGiKS7qTIaEGXnHN9LYK5OnTJJUGkObvLtm5ug HS8MuQOUscWptHHID0L3PRcMI7SnvNkGNaX1p5ZVpK8CeqFes46ErqnOVzXSIDp1kToUKE nxQHrZ4PBhgy1tSV0g47yggGqDGA8rA+9/64vAxge4DsQWxVjEO+nOvD4W5BpKDRNkfhwB Ehyi7yxAxfLUtx/YhKCtIwr260Kf43YmQRRozmYLoQp3aIRImW6cEKX+XDsmmQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YsV8OZUn; 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: -7.21 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=YsV8OZUn; 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: 704BA178EC X-Spam-Score: -7.21 X-Migadu-Scanner: scn0.migadu.com X-TUID: JosNT9qymM3I Ihor Radchenko writes: > Tim Cross writes: > >>> I propose to do the following: >>> 1. org-time-stamp-formats and org-time-stamp-custom-formats will be >>> treated as is, unless they contain "<" and ">" and the first and the >>> last char. >>> 2. If the formats do contain <...>, strip the "<" and ">". >>> 3. Document (2) in the docstrings. >>> >>> Any objections? >> >> Little unsure/confused regarding what is being proposed here. >> >> - If we are removing <...>, does that mean we just retain [..] for >> inactive timestamps and all other timestamps are 'active' by default? > > org-time-stamp-formats is a constant. Users are not supposed to change > it. So, the proposed stripping of "<" and ">" has a pure purpose of not > breaking third-party code that might be using its current default value. > It is more about some internal code assumptions. > > org-time-stamp-custom-formats currently has the following docstring: > > Custom formats for time stamps. See format-time-string for the syntax. > > These are overlaid over the default ISO format if the variable > org-display-custom-times is set. Time like %H:%M should be at the > end of the second format. The custom formats are also honored by export > commands, if custom time display is turned on at the time of export. > > There is nothing in the docstring indicating that "<" and ">" are > required or used in any way. The current Org code assumptions only > create confusion among the users. > > I propose to strip "<" and ">" just to avoid breakage if users happened > to set org-time-stamp-custom-formats to the value with "<...>" that is > required to make this defcustom working in older Org versions. > > If users abused the undocumented behavior and used "[...]", we do not > need to worry as it is out of what was promised. > > At the end, old user settings of org-time-stamp-custom-formats should > remain working within docstring promises. > Old user code using org-time-stamp-formats constant should also remain > working. > But users will not need to provide brackets in > org-time-stamp-custom-formats after the proposed change. > > The above is the most safe way to retain backwards compatibility while > removing the existing confusion with the docstring. > >> - How will this change impact code which distinguishes active/inactive >> timestamps based on presence/absence of <..> and [..]? > > org-time-stamp-formats value will not change. > org-time-stamp-custom-formats value had no impact on buffer text---just > the overlayed timestamp display. No code should be affected. > >> - What impact will this have on existing org files? > > None. > >> - Will this cause issues in parsing when you may have dates/times which >> are not supposed to be timestamps, but will look the same as >> timestamps? How will you distinguish them? > > No buffer text will be affected. > >> Personally, I like the clear distinction between what is a timestamp and >> what isn't and what is an active timestamp and what is an inactive >> timestamp. > > There is nothing about active/inactive timestamps in the discussed > variables. The usage of "<" and ">" is historical and mostly ignored by > Org code. First and last characters are simply stripped, and the required > brackets are being used when inserting the actual timestamps. > > The proposed change simply aims to remove the undocumented requirement > about brackets. OK, thanks for clarifying. Based on this, I don't see any issues with your proposed change.