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.
This commit is contained in:
Daniel - 2023-01-16 19:09:22 +01:00
parent bb7da2e08e
commit e5577f8094
No known key found for this signature in database
GPG Key ID: 784AA8DF0CCDF625
1 changed files with 9 additions and 1 deletions

10
init.el
View File

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