summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.org12
1 files changed, 11 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 8c90cba..7a6ee4b 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -846,6 +846,12 @@ Sometimes I want to insert a date or time into a buffer.
     (insert (format-time-string format))))
 #+END_SRC
 
+#+BEGIN_SRC emacs-lisp
+  (defun yesterday-time ()
+    "Provide the date/time 24 hours before the time now in the format of current-time."
+    (timer-relative-time (current-time) -86400))
+#+END_SRC
+
 ** Time of Day
 
 #+BEGIN_SRC emacs-lisp
@@ -1562,7 +1568,11 @@ I can use this to keep a journal.  I should use it.
     :bind ("s-j" . org-journal-new-entry)
     :defer 20
     :config (progn
-              (setq org-journal-date-format "%A, %d %B %Y")))
+              (setq org-journal-date-format "%A, %d %B %Y")
+              (defun org-journal-display-entry-yesterday ()
+                "Show org-journal entry for yesterday"
+                (interactive "P")
+                (org-journal-read-or-display-entry (yesterday-time)))))
 #+END_SRC
 
 **** org-mobile