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 +HfFH8MT3WKYfwAAbAwnHQ (envelope-from ) for ; Sun, 24 Jul 2022 11:41:23 +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 ELRnH8MT3WKIhQEAauVa8A (envelope-from ) for ; Sun, 24 Jul 2022 11:41:23 +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 2C6C3149B6 for ; Sun, 24 Jul 2022 11:41:23 +0200 (CEST) Received: from localhost ([::1]:38930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFY70-0000hV-8t for larch@yhetil.org; Sun, 24 Jul 2022 05:41:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38452) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFY5y-0000h7-NG for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 05:40:19 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:42962) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFY5x-00014F-3B for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 05:40:18 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d10so7939888pfd.9 for ; Sun, 24 Jul 2022 02:40:16 -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=S9+PxDWBVc0uzHiCxaFcOoZmEkrl9/wwuTI2Q0cfC+U=; b=ZWIlfoi1ieYj5aMVjJAgj/VyXJeDod+XYsVidMraDzE4xpZ1hDHICf2vU8J93l2h9L fu5i8bWFqfJZutm0uBAHHHy4U32Ie4tIhcOjYetWHK3adhSzpZQM77n895UtWRG+7/ng mD7g+eQqZNgH4N/Ucfd8by9786o9Yjy32t9LVNb/C3TDB/ZFKMB2a5GEFr1ZoFo+PcuC /KHYVcRXTgoTGAP1Wtn4D2Sxx7nUjmRm3npVmnnSdM6s3mBUaBfp/DjU+ctfnhkSgXZ2 R+lNI1KUbCNZ9STyQrMgYfbpzOZrSQpL1LjOoO5fOb7PYV834h3GqUOnjrkMelCIE2sA vYUg== 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=S9+PxDWBVc0uzHiCxaFcOoZmEkrl9/wwuTI2Q0cfC+U=; b=RsNSADJUI+sMttgiMsLjsL3xdHtrdigVMHzdldUuUBuilhqTwsCNO+Qd9JxD4GinO9 jxZ9MTGDoMPOPYLvn8apErFelzLerfMgTNpyerf721hOtXioOVfj3VICoInqE5HQPPvu NlFgr2wP8LtUnmb6USPPwkUq7Id50nO5iXODWLGq52hNPbZzCAs1SGc1588GBD7Rh7I1 xP38jf7Ra7Ui4A/wwfwljwFHsFvsgIafIom/+2q+/YWinA1IlqIGOVcBGXa92zxNHRiR 76PY2wezgUkiUEomDmxb6m5EXtJOhet1Y3wfePeuwPBS4AD7I5EvQpESTbrD5kGtZf8w XdyQ== X-Gm-Message-State: AJIora8iqkbL+utEUyyxLiEO8Z0hY6m7aKT/WJSo31pVbXKcJQWogqDj zKiA5aEZnFKwZtt1YDmTWvw= X-Google-Smtp-Source: AGRyM1teUiFs4H94+dVw8JAVsTptubbMs5h5WfyQC8EE08v4VkeQpOu4PjWnBSN3L9yc402hSZxWew== X-Received: by 2002:a63:5441:0:b0:412:64de:5f35 with SMTP id e1-20020a635441000000b0041264de5f35mr6749349pgm.321.1658655615191; Sun, 24 Jul 2022 02:40:15 -0700 (PDT) Received: from localhost ([1.83.155.1]) by smtp.gmail.com with ESMTPSA id b19-20020a62a113000000b0052ba88f2de0sm7172744pff.131.2022.07.24.02.40.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 02:40:14 -0700 (PDT) From: Ihor Radchenko To: Kenneth Stuart Cc: emacs-orgmode@gnu.org Subject: Re: Bug in definition of org-encode-time In-Reply-To: References: Date: Sun, 24 Jul 2022 17:41:18 +0800 Message-ID: <87y1widf0h.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=yantar92@gmail.com; helo=mail-pf1-x42b.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: , 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=1658655683; 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=S9+PxDWBVc0uzHiCxaFcOoZmEkrl9/wwuTI2Q0cfC+U=; b=ceMLuYBkbuFozXEUPpvMk2adykC9I1PwGAisErJVtxx4GaeSSj9rTxqsWpMg0rZff5M3pU LYM/FabX/aScfw8j/nlrSL3SYiZlmCsZy88I5cKc5xQLddL1ZWm1YvwVG+tSbRVrV398tZ NFSkwAyqkDs99RN0gTqucliUNRbFyMRNCOaDtL6YyvIoZJXdNqzHj5zZHixTTWBL5h23h9 qX6Eakj0sFaAz8W5inECtkMClhMlsvJXmuHo05ufRR9NvTljlyIouzdDnbEN0xUG9NUuM7 6tIcWLdy98BhhlUvzkYtGrDYSqr/EcxjqwIz3cPawq1HA3qBmLtCghICjavw1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658655683; a=rsa-sha256; cv=none; b=NlHucCRakQuPX+YW8TjDnaYAv3ofwbGQz8cbSTmW7kcWncx8txu2rac910q0RuwPHUXW/z G9kdh6hCKkYsSfjaNTNA4gBYczpUbJxRYMfAvCtGKHoBUqdnzHxptrrTFzoFz3ta2mX0JO gpG3o2qXvz7otlf9urDInlANkvzNDY/OIDs0pQaop/BTSniHlBUbtojBpHesbt9fxk1zfO zXxILEioazr5w7IA+XIgQFn8BNWuWaV7cP1mcQc2jv5p0TE34krWkDNYZa/ojfKBex1269 MqZjiOO6501QEyiZBwpJ9ytF7CCRV4BTSWDZIDHJSy+r1wsonlX3oxCLtGWRqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZWIlfoi1; 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: -5.03 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZWIlfoi1; 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: 2C6C3149B6 X-Spam-Score: -5.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: OAK2lfliI0mz Kenneth Stuart writes: > Macro `org-encode-time` (lisp/org-macs.el +1395) does not get defined > for emacs >= 27.1 as the top level if statement is missing its ELSE clause. Are you sure? > #+begin_src elisp > (if (version< emacs-version "27.1") > (defmacro org-encode-time (&rest time) > (if (cdr time) > `(encode-time ,@time) > `(apply #'encode-time ,@time))) > (if (ignore-errors (with-no-warnings (encode-time '(0 0 0 1 1 1971)))) > (defmacro org-encode-time (&rest time) > (pcase (length time) ; Emacs-29 since d75e2c12eb > (1 `(encode-time ,@time)) > ((or 6 9) `(encode-time (list ,@time))) > (_ (error "`org-encode-time' may be called with 1, 6, or 9 arguments but %d given" > (length time))))) > (defmacro org-encode-time (&rest time) > (pcase (length time) > (1 `(encode-time ,@time)) > (6 `(encode-time (list ,@time nil -1 nil))) > (9 `(encode-time (list ,@time))) > (_ (error "`org-encode-time' may be called with 1, 6, or 9 arguments but %d given" > (length time)))))) //MISSING ELSE//) > #+end_src This is equivalent to (if condition (defmacro ...) ;; else (if another-condition (defmacro ...) ;; else (defmacro))) Best, Ihor