From mboxrd@z Thu Jan 1 00:00:00 1970 From: thunk2@arcor.de (Thomas Plass) Subject: Re: [PATCH] make 'org-at-date-range-p work like org-at-timestamp-p Date: Tue, 19 Mar 2019 20:49:49 +0100 Message-ID: <23697.18397.929488.153848@AGAME7.local> References: <23692.5492.62319.323977@AGAME7.local> <87mulrsvta.fsf@nicolasgoaziou.fr> Reply-To: Thomas Plass Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:48856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h6KmH-0001bp-5G for emacs-orgmode@gnu.org; Tue, 19 Mar 2019 15:52:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h6KkJ-0003jA-Og for emacs-orgmode@gnu.org; Tue, 19 Mar 2019 15:50:00 -0400 Received: from vsmx011.vodafonemail.xion.oxcs.net ([153.92.174.89]:38069) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h6KkJ-0003a9-G0 for emacs-orgmode@gnu.org; Tue, 19 Mar 2019 15:49:59 -0400 Received: from vsmx003.vodafonemail.xion.oxcs.net (unknown [192.168.75.197]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 59DB73E0338 for ; Tue, 19 Mar 2019 19:49:56 +0000 (UTC) Received: from agame7.arcor.de (unknown [2.205.23.198]) by mta-7-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 2A4D0300542 for ; Tue, 19 Mar 2019 19:49:54 +0000 (UTC) In-Reply-To: Your message of Monday, March 18 2019 22:43:13 (ID: <87mulrsvta.fsf@nicolasgoaziou.fr>). List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Nicolas, thanks for taking care. But there's another thing. I don't know what I've done to my Org buffer, but what look like timestamps are a mixture of element types 'timestamp and 'planning. Anyway, 'org-at-timestamp-p returns nil for the 'planning timestamps. Which causes breakage. Please take a look at the patch. It could be that 'org-check-*-date functions might also be affected by the same problem, I haven't tested. Regards Thomas >From dda6f686e40663b1da3151686145cd125d1f88d1 Mon Sep 17 00:00:00 2001 From: Thomas Plass Date: Tue, 19 Mar 2019 21:24:19 +0200 Subject: [PATCH] Check timestamp contexts for both element types 'timestamp and 'planning. --- lisp/org.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index ee1082376..3f2e429dd 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15178,10 +15178,10 @@ When matching, the match groups are the following: (and (bound-and-true-p org-agenda-include-inactive-timestamps) (org-at-clock-log-p)))) - (eq 'timestamp - (save-excursion - (when (= pos (cdr boundaries)) (forward-char -1)) - (org-element-type (org-element-context))))))))))) + (memq (save-excursion + (when (= pos (cdr boundaries)) (forward-char -1)) + (org-element-type (org-element-context))) + '(timestamp planning))))))))) (cond ((not match?) nil) ((= pos (match-beginning 0)) 'bracket) -- 2.13.1.windows.2