emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: Escaping org mode date properties


From: Ihor Radchenko
Subject: Re: [PATCH] Re: Escaping org mode date properties
Date: Mon, 03 Jan 2022 11:39:19 +0800

Eduardo Suarez-Santana <esuarez@itccanarias.org> writes:

> However, how about next cases?
>
> * an example block
> #+begin_example
> SCHEDULED: <2015-02-16 Mon .+2d>
> #+end_example

I am unable to reproduce this using Org 9.5.2
Can you provide concrete steps starting from bare Emacs how to reproduce
the inconsistency you are seeing?

> * an example with colon
> : SCHEDULED: <2015-02-16 Mon .+2d>
> I think they behave the same way as 'begin_src'.

If you mean that adding example/fixed-width environment does not make
disappear, I am unable to reproduce.

However, the second case is wrongly recognised as a heading with timestamp.

Can you try the attached patch? (on top of previous)

>> For future. You will make things much easier if you provide a clear
>> sequence of steps to reproduce the problem. Your original report is not
>> reproducible if I just copy-paste your code into a new org file. I had
>> to guess what you did in order to see the problem.
>
> Sorry about that. I got weird results and was not sure about the expected
> behaviour. I had already asked in IRC with no answer.

"Weird" usually means that you expect some behaviour, but get surprised.
However, for a person far away using different environment and settings
(me), it is hard to guess about what went wrong without knowing details
of what you did, what you expected, and what went wrong.

See https://orgmode.org/worg/org-contribute.html and
https://www.chiark.greenend.org.uk/~sgtatham/bugs.html for detailed
instructions.

Best,
Ihor

>From 0d91c1bd81cb6fe19666761e50fb1368add385a8 Mon Sep 17 00:00:00 2001
Message-Id: 
<0d91c1bd81cb6fe19666761e50fb1368add385a8.1641180460.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Mon, 3 Jan 2022 11:26:18 +0800
Subject: [PATCH] org-agenda-get-timestamps: Ignore non-timestamps matching re

* lisp/org-agenda.el (org-agenda-get-timestamps): Explicitly confirm
that object at point is a timestamp.

Fixes 
20220102210433.GC29829@itccanarias.org/T/#m39b80d45d7d6cfc6b713284365c283579ac94cb1">https://list.orgmode.org/20220102210433.GC29829@itccanarias.org/T/#m39b80d45d7d6cfc6b713284365c283579ac94cb1
---
 lisp/org-agenda.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index fed36ac9b..94aea1b0a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -86,6 +86,8 @@ (declare-function org-add-archive-files "org-archive" (files))
 (declare-function org-capture "org-capture" (&optional goto keys))
 (declare-function org-clock-modify-effort-estimate "org-clock" (&optional 
value))
 
+(declare-function org-element-type "org-element" (&optional element))
+
 (defvar calendar-mode-map)
 (defvar org-clock-current-task)
 (defvar org-current-tag-alist)
@@ -5729,7 +5731,8 @@ (defun org-agenda-get-timestamps (&optional deadlines)
                    (org-at-planning-p)
                    (org-before-first-heading-p)
                    (and org-agenda-include-inactive-timestamps
-                        (org-at-clock-log-p)))
+                        (org-at-clock-log-p))
+                    (not (eq 'timestamp (org-element-type 
(org-element-context)))))
            (throw :skip nil))
          (org-agenda-skip))
        (let* ((pos (match-beginning 0))
-- 
2.34.1


reply via email to

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