From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#74869: Fwd: [PATCH] Add predicates for decoded times and time deltas Date: Sun, 29 Dec 2024 11:18:33 -0800 Message-ID: <7be82ecf-0d4f-488a-94ae-3f39fe886edb@cs.ucla.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15035"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Richard Lawrence To: 74869@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 29 20:19:18 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1tRyon-0003mJ-77 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Dec 2024 20:19:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRyoa-000659-Cq; Sun, 29 Dec 2024 14:19:04 -0500 Original-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 1tRyoY-000651-9c for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 14:19:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRyoY-0001UW-0o for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 14:19:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=B5R95gHqVc7v7fMCAiXl/YAbhUp0CNGVHEr6iwp39pQ=; b=JPh5I43j7wB6TLotbu3xv9uAlJzVy9o9WojHN0tle/8qXBy8lLX6BYfSNj9bZJ3lZzZMlniMhPvfKFphii1V2/uQbfHtbVy1q24JA9/wnZkAqxlCq0JcrO2bZELcg3JMxeqCOvEj5YbN39jZlrSdk+cpTwVOHTVqrBtkXPxJP1Ku6rUhInWESCyAua4hDcop4kTg41h1CGGX2qW1GnFhAqTae0D9Ws2dE85PbHvbHjlPigtX9bLiN96alt+Pw8CWJNJirODzPTIjhjZ4H2tgIuaDeVMKbhXLP8430gQF4hTPQ/6OcZDrrVF1Xr8K4AoHlOGI/ccx9PrWVjjv7G5rqw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRyoX-0000MH-Rd for bug-gnu-emacs@gnu.org; Sun, 29 Dec 2024 14:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Dec 2024 19:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74869 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 74869-submit@debbugs.gnu.org id=B74869.17354999211347 (code B ref 74869); Sun, 29 Dec 2024 19:19:01 +0000 Original-Received: (at 74869) by debbugs.gnu.org; 29 Dec 2024 19:18:41 +0000 Original-Received: from localhost ([127.0.0.1]:56248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRyoC-0000Lf-Jl for submit@debbugs.gnu.org; Sun, 29 Dec 2024 14:18:40 -0500 Original-Received: from mail.cs.ucla.edu ([131.179.128.66]:49528) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRyoB-0000LR-1h for 74869@debbugs.gnu.org; Sun, 29 Dec 2024 14:18:39 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id BEF063C005176; Sun, 29 Dec 2024 11:18:33 -0800 (PST) Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 5bNG9tZDcn60; Sun, 29 Dec 2024 11:18:33 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7F0713C026D7F; Sun, 29 Dec 2024 11:18:33 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 7F0713C026D7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1735499913; bh=B5R95gHqVc7v7fMCAiXl/YAbhUp0CNGVHEr6iwp39pQ=; h=Message-ID:Date:MIME-Version:To:From; b=IwMbi9xK0bha5xcNoIGDHEZN4rfe+ataZDrWGUkNnCWxKKVIjF90qSWulM/UDm++O B4K9UOIr6ZOGHNGZoAsQDyo40iMcbLmX/+/EwMdU3eDuwXJ+U6n66g55sjOBhE9d5c ma1JMqtz/nxCeydPnN0MLmu9p+RGR6Our1TT65VBhZ73CbCNUimOs0YIORCXZTJirq /bDmwEKTcOj/NLcco24kopq/mvtr+M3zpsEF81OXE9jLQXY/Gdv60052wZsJlWjLxH Nc5nxwB9vFGx+wpeF4b2XxtXF5H00XpEAuRkVRfkbrJqir5KFrikvwy8XBRwt+yc2j bDTycyKAYpQCQ== X-Virus-Scanned: amavis at mail.cs.ucla.edu Original-Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id opntULYYUG9F; Sun, 29 Dec 2024 11:18:33 -0800 (PST) Original-Received: from [192.168.0.102] (unknown [47.154.28.214]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 577A63C005176; Sun, 29 Dec 2024 11:18:33 -0800 (PST) Content-Language: en-US In-Reply-To: X-Forwarded-Message-Id: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:297972 Archived-At: Forwarding another mis-addressed email of mine. -------- Forwarded Message -------- Subject: Re: [PATCH] Add predicates for decoded times and time deltas Date: Sat, 28 Dec 2024 09:26:23 -0800 From: Paul Eggert To: Richard Lawrence CC: 74689@debbugs.gnu.org On 12/28/24 07:56, Richard Lawrence wrote: > I need to use > `calendar-extract-month' with a plain date value, but > `decoded-time-month' with a date-time value. I need type predicates to > do such dispatching. Not necessarily; you can instead try each function in turn and use the first that works. I have some qualms about saying that decoded times are a "type". Whether a decoded time is valid depends on the timezone: (0 30 2 10 3 2024 0 t -21600) is a valid decoded time in Phoenix but not in Denver, because clocks sprang forward over that time in Denver but not in Phoenix. When data interpretation gets that complicated, the Emacs notion of "type" is not always the best.