branch: externals/denote
commit c2f96b072a973719f22b5cbb606b11db4ab5d649
Author: Jean-Philippe Gagné Guay <[email protected]>
Commit: Jean-Philippe Gagné Guay <[email protected]>
Load org in denote--date-prompt
---
denote.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/denote.el b/denote.el
index 4d0af88729..b3ea78e84d 100644
--- a/denote.el
+++ b/denote.el
@@ -1128,9 +1128,12 @@ here for clarity."
(defvar denote--date-history nil
"Minibuffer history of `denote--date-prompt'.")
+(declare-function org-read-date "org" &optional with-time to-time from-string
prompt default-time default-input inactive)
+
(defun denote--date-prompt ()
"Prompt for date."
- (if denote-date-prompt-use-org-read-date
+ (if (and denote-date-prompt-use-org-read-date
+ (require 'org nil :no-error))
(let* ((time (org-read-date nil t))
(org-time-seconds (format-time-string "%S" time))
(cur-time-seconds (format-time-string "%S" (current-time))))