all repos — nixfiles @ 69413c7d25dff2a08568aa1c27bd976b233a0371

System and user configuration, managed by nix and home-manager

Emacs: Add function to read yesterday’s journal

Alan Pearce
commit

69413c7d25dff2a08568aa1c27bd976b233a0371

parent

4f8474bb4397513c51f3b997aab94855200f29bf

1 file changed, 11 insertions(+), 1 deletion(-)

jump to
M tag-emacs/emacs.d/init.orgtag-emacs/emacs.d/init.org
@@ -846,6 +846,12 @@ ((equal prefix '(4)) "%Y-%m-%dT%H:%M:%SZ"))))
(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 @@ :require org
: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