From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id CGSQJrJhT2MOaAAAbAwnHQ (envelope-from ) for ; Wed, 19 Oct 2022 04:32:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6MReJrJhT2Mu+QAAauVa8A (envelope-from ) for ; Wed, 19 Oct 2022 04:32:18 +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 3F2C415ED0 for ; Wed, 19 Oct 2022 04:32:18 +0200 (CEST) Received: from localhost ([::1]:36788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okysS-0001a6-TQ for larch@yhetil.org; Tue, 18 Oct 2022 22:32:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okyqu-0001Z5-SF for emacs-orgmode@gnu.org; Tue, 18 Oct 2022 22:30:45 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okyqV-0007lH-GU for emacs-orgmode@gnu.org; Tue, 18 Oct 2022 22:30:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3DF90240101 for ; Wed, 19 Oct 2022 04:30:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1666146613; bh=RfDDIviGmXuZ+8tg80b3OKptRTvSoFl0HkFV48SIGis=; h=From:To:Cc:Subject:Date:From; b=g5U8UHQna4sEPLTq9sfOu31AUS0iuI/KL+dUCOhdNeH90riKct81ymMq66r6bbnYy e5cCtD3i3AWxDIo1cmaNUIOFI3uKHvzdfowlWz/gu5BKwDpSBNaUDJg8TuSPWxTkeO cGB6nBb1CTmHwdgo9qZdpCyvt5tz+lgxD1Hu9+qxyqQ7DiJf4zK7ZPgc9lEqRgEGY0 Jfta0GWfutGcYJJUunPYe6vfWkdbbhBZt7v3TxhN6tamvnQncrZf5204sYcq7A7Skv iQNNtLtKB5nzVx3xL09DoqNInZ1sFC4Yyd02dH7AeOeHgJLdiGyTddBkSjSSFlDEEC P6c0BtdVL1dUQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4MsZSx0Ycbz6tnj; Wed, 19 Oct 2022 04:30:08 +0200 (CEST) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: [PATCH] Bind calendar-debug-sexp to non-nil when running tests (was: problem with diary sexps) In-Reply-To: References: <875ynsq048.fsf@ucl.ac.uk> <174462e9-b12f-ca0a-04b5-012bc27b603b@recentlyrezzed.de> <875ynnojvf.fsf@localhost> Date: Wed, 19 Oct 2022 02:30:54 +0000 Message-ID: <87y1tcczoh.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de 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, LOTS_OF_MONEY=0.001, 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: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" 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=1666146738; 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=7Ygw7SFTRvP3jX+26UjRsx6zwDE02IEFgSLawhx3qko=; b=Jh3v43EKqkLJOjicqgHNfis+fwaGrWhDbhoTEHKHlDOS/mQqLoLcxzqSezbLyqVKxkItq7 H166s+NY4V5eV/ZXraWnmIAKBPIIZjrFokW37I13r2yKpsaySDGmdXgkVPWdZ7xKxH3HHZ O9lTTDabrINc9Tj4T6a+HzxUg2cJs4kjUi8P9ao7V3tQC00cMEDT31pEPdVkud5HVKRnuR 03ZII0WjwWDLHb/gZC6Ap/Q5c/RiE37Ov2NIn0csCiFFEi5HxMCD29xjhMTQxcteWvmnIT aoOb0yCUUMygZnQL+haNCS640LZh56HB3zzjt2LRJK8lHPpZd6Gz65c3Zjc+TQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666146738; a=rsa-sha256; cv=none; b=QmmNRvvfSmBaS+xml2pc+wR7pOyXf/3r3v3wAQm5+e/bEJRqdelAi/yodufyAynvhmkUWu cH70U67aUv/kha7Z3f0IuqsLaLCZpbB89rQw0hnle5cHcYBr/d2D81aOoROMaYBg9mnirz N7R47lbtTGwFjSzhqaMTZrD6IfAbeGiHS33qcuZQP6cyrt87rBYcBizMDWVclxdS4Qxdx9 1OfOU3P2T6k68G3hT1QF8hHPt9l6TDA1ZQ6wfJJRC87VIJPVME+yHU1geOnyyz7ADG41w9 c3uwfqCqml0YiokP6AyTMwU/Kt4hFzJsH08pFqWeHUM+k8xS4tSdU6sQUkv9Vw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=g5U8UHQn; dmarc=pass (policy=none) header.from=posteo.net; 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: 1.58 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=g5U8UHQn; dmarc=pass (policy=none) header.from=posteo.net; 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: 3F2C415ED0 X-Spam-Score: 1.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5C/SKAApByav --=-=-= Content-Type: text/plain Max Nikulin writes: >> More accurate error can be found after setting calendar-debug-sexp to t. >> I got the following backtrace clearly indicating lexical scope issue: >> >> Debugger entered--Lisp error: (void-variable entry) >> (diary-float t 2 1) >> (let ((entry "") (date '(4 5 2022))) (diary-float t 2 1)) >> (eval (let ((entry "") (date '(4 5 2022))) (diary-float t 2 1)) t) > > It looks like the source of the problem with unit tests that I faced > yesterday trying to look closer at the bug with daylight saving time in > agenda. I guess we can permanently bind calendar-debug-sexp to non-nil in tests. It should help if we encounter diary-related issues in future. WDYT? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-testing-Provide-more-debug-info-for-diary-sexps.patch >From e86bbe12b79f9958fcd5ccf1586e9d9c829ee8c2 Mon Sep 17 00:00:00 2001 Message-Id: From: Ihor Radchenko Date: Wed, 19 Oct 2022 10:28:40 +0800 Subject: [PATCH] testing: Provide more debug info for diary sexps * testing/org-test.el (org-test-run-batch-tests): (org-test-run-all-tests): Bind `calendar-debug-sexp' to non-nil when running tests. See https://orgmode.org/list/t2hpe9$119m$1@ciao.gmane.io --- testing/org-test.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testing/org-test.el b/testing/org-test.el index 9f7bab9ea..65d157bca 100644 --- a/testing/org-test.el +++ b/testing/org-test.el @@ -457,7 +457,9 @@ (defun org-test-run-batch-tests (&optional org-test-selector) (let ((org-id-track-globally t) (org-test-selector (if org-test-selector org-test-selector "\\(org\\|ob\\)")) - org-confirm-babel-evaluate org-startup-folded vc-handled-backends) + org-confirm-babel-evaluate org-startup-folded vc-handled-backends + ;; Catch errors in diary sexps better. + (calendar-debug-sexp t)) (org-test-touch-all-examples) (org-test-update-id-locations) (org-test-load) @@ -471,7 +473,9 @@ (defun org-test-run-all-tests () (org-test-touch-all-examples) (org-test-update-id-locations) (org-test-load) - (ert "\\(org\\|ob\\)") + (let (;; Catch errors in diary sexps better. + (calendar-debug-sexp t)) + (ert "\\(org\\|ob\\)")) (org-test-kill-all-examples)) (defmacro org-test-at-time (time &rest body) -- 2.35.1 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--