emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Eduardo Suarez-Santana <esuarez@itccanarias.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Re: Escaping org mode date properties
Date: Mon, 03 Jan 2022 11:39:19 +0800	[thread overview]
Message-ID: <875yr1trmg.fsf@localhost> (raw)
In-Reply-To: <20220102210433.GC29829@itccanarias.org>

[-- Attachment #1: Type: text/plain, Size: 1524 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-agenda-get-timestamps-Ignore-non-timestamps-matc.patch --]
[-- Type: text/x-diff, Size: 1586 bytes --]

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 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)
 		    (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))
 	(let* ((pos (match-beginning 0))

  reply	other threads:[~2022-01-03  3:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01 12:24 Escaping org mode date properties Eduardo Suarez
2022-01-01 15:10 ` Ihor Radchenko
2022-01-01 20:01   ` Eduardo Suarez-Santana
2022-01-02  2:51     ` [PATCH] " Ihor Radchenko
2022-01-02 21:04       ` Eduardo Suarez-Santana
2022-01-03  3:39         ` Ihor Radchenko [this message]
2022-01-03 10:39           ` Eduardo Suarez-Santana
2022-01-12 13:14             ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yr1trmg.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=esuarez@itccanarias.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).