Created
May 10, 2022 15:59
-
-
Save TikhonJelvis/4a3fa0f8cc9fae9068e8560ddbc6c29e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-read-add-default-time | |
(&optional with-time to-time from-string prompt | |
default-time default-input inactive) | |
"Filters the inputs to `org-read-date', setting the current time | |
as the default input if one was not already specified." | |
(let ((new-default (or default-input (format-time-string "%H:%M")))) | |
(list with-time to-time from-string prompt | |
default-time new-default inactive))) | |
(define-advice org-read-date (:filter-args (args) default-current-time) | |
"Use the current time as the default input for `org-read-date' | |
unless one was provided." | |
(apply 'org-read-add-default-time args)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment