Subject: bug#38599: closed (Re: bug#38599: 27.0.50; org-agenda lists invalid Diary entries)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 28 Dec 2019 20:23:01 +0000

Your bug report

#38599: 27.0.50; org-agenda lists invalid Diary entries

which was filed against the org-mode package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
38599: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38599
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#38599: 27.0.50; org-agenda lists invalid Diary entries
From: Thomas Fitzsimmons <[email-masked]>
To: [email-masked]
Cc: Justin Abrahms <[email-masked]>
Date: Sat, 28 Dec 2019 15:22:11 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Thomas Fitzsimmons <[email-masked]> writes:

[...]

> Justin confirmed the attached patch fixes the problem for him.  Can an
> Org mode maintainer review it?

I also reported this upstream to the Org maintainers and they accepted
the fix.  Org 9.3.1, which contains the fix, has been released.  You can
install it from GNU ELPA.  I'm marking this bug as done.

Thomas

Subject: 27.0.50; org-agenda lists invalid Diary entries
From: Thomas Fitzsimmons <[email-masked]>
To: [email-masked]
Cc: Justin Abrahms <[email-masked]>
Date: Fri, 13 Dec 2019 17:14:16 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Justin reported to me a bug he found while using Excorporate.

In Justin's setup, Excorporate retrieves meeting details from a server
then writes them to a Diary file.  Org agenda reads from that Diary
file.

In the failing case, the meeting details happened to contain lines whose
middles matched diary-time-regexp, e.g. any URL containing 0-9 and then
'h'.  Those non-entry lines were displayed as Diary: entries in the Org
agenda, when they shouldn't have been.

Justin confirmed the attached patch fixes the problem for him.  Can an
Org mode maintainer review it?

Thanks,
Thomas

>From 938be223a8bfd75df61a703d392d2154b6c479c4 Mon Sep 17 00:00:00 2001
From: Thomas Fitzsimmons <[email-masked]>
Date: Fri, 13 Dec 2019 15:57:28 -0500
Subject: [PATCH] Fix time regexp in org-get-entries-from-diary

* lisp/org/org-agenda.el (org-get-entries-from-diary): Make time regular
expression more precise.

Reported-by: Justin Abrahms <[email-masked]>
---
 lisp/org/org-agenda.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 2404ca43dc..05c35b8ac3 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -5135,6 +5135,7 @@ org-get-entries-from-diary
 	  (cons 'org-diary-default-entry diary-list-entries-hook))
 	 (diary-file-name-prefix nil) ; turn this feature off
 	 (diary-modify-entry-list-string-function 'org-modify-diary-entry-string)
+	 (diary-time-regexp (concat "^" diary-time-regexp))
 	 entries
 	 (org-disable-agenda-to-diary t))
     (save-excursion
-- 
2.24.0