From e5577f8094c087d18111773540f99400f313db0c Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Mon, 16 Jan 2023 19:09:22 +0100 Subject: [PATCH] Fix `org-read-date` not recognizing hh:mm parts on startup The problem seems to be the dynamically scoped variable `org-time-was-given`, which is used by `org-read-date` to decided whether an hh:mm part is present. The variable `org-time-was-given` is set by `org-read-date-analyze`, but only when it's (globally) bound, which it is not on startup (since it's only declared via `defvar`). Manually setting the variable to nil binds the variable and everything seems to work nicely. --- init.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index 11dfb39..613e4c1 100644 --- a/init.el +++ b/init.el @@ -977,7 +977,15 @@ ;; Caching is not possible, check it directly. (org-entry-get pom property 'inherit) ;; This is different in the original implementation - (org-entry-get pom property)))))) + (org-entry-get pom property)))) + + ;; Fix (Org 9.5.5): the variable `org-time-was-given' dynamically + ;; bound to signify when `org-read-date-analyze' has found a hh:mm + ;; part; it's only considered, however, when it has previously been + ;; bound, resulting in some prior calls of `org-read-date' to ignore + ;; the hh:mm part. So let's bind this variable now to make things + ;; work. + (setq org-time-was-given nil))) ;; Drag-and-Drop images into org-mode buffer (use-package org-download