emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] make 'org-at-date-range-p work like org-at-timestamp-p


From: Thomas Plass
Subject: Re: [O] [PATCH] make 'org-at-date-range-p work like org-at-timestamp-p
Date: Tue, 19 Mar 2019 20:49:49 +0100

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 <address@hidden>
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]