Reflect on your Org-mode-related daily journal entries (currently set-up mainly for org-roam). Shows a range of split windows, each with an org-roam daily in them, at specified intervals.
You can use Org Daily Reflection like one does with a paper three- or five-year diary, to see what was happening on this day last year, and the year prior, &c.
But you could also look at the last three days of daily journals…
…or dailies at other specified intervals (e.g. days, weeks, fortnights, months, years, [decades], [centuries]). (E.g., “show me 7 dailies at weekly intervals”; “show me 4 dailies at monthly intervals”, &c.)
A general interactive interface can be accessed via the command org-daily-reflect
, which will ask the user for a time-span (e.g. “year”) and an integer range (“3”). When called non-interactively, it also be passed a span and range number (e.g., (org-daily-reflect 'year 3)
, to get dailies comparing this day on the preceding three years.)
A few sample one-shot functions with prefix org-reflect-on-last-
are included as well (e.g. org-reflect-on-last-five-days
to see the preceding five days of org-roam dailies). The user can create new functions or commands using these models for their desired reflections.
- add
org-daily-reflection-layout-toggle
command, which restores the window layout, pre-reflection; and can be used thereafter as a toggle between the pre-reflection and reflection window layouts.
- restored old interactive behaviour of
org-daily-reflect
, to show n number (total) of dailies at m intervals.
The interactive =org-daily-reflect= command now shows the *preceding* /n/ number of dailies, rather than showing a total of /n/ dailies. [ *breaking-change* ]- The non-interactive
org-daily-reflection--reflect
function now produces the preceding n number of dailies, rather than showing a total of n dailies. (You can still use the interactive commandorg-daily-reflect
non-interactively [in elisp] in the old fashion (just only with a single span, of course).) - The interactive
org-daily-reflect
command is now a wrapper round the mainorg-daily-reflection--reflect
function. This function accepts an alist of dotted pairs of the form “(time-span interval)”, e.g.,(('day . 3) ('month 4) ('year . 2))
(which would show the 3 days preceding the current journal entry, preceded by dailies for 4 months before that, preceded by dailies for 2 years before the earliest of the monthly dailies). Thus you can create complex arrangements of dailies to reflect on. [ breaking-change ]
Org Daily Reflect does not, in fact, actually require the Org-roam package, so it should be able to be used with other daily journal systems (certainly with Org Node (which I use) and probably with Denote). Currently it relies on being told a directory which contains Org files which are all of the form <YYYY-MM-DD>.org
. (E.g., 2021-12-29.org
, 2024-08-05
, &c.) See below, esp. the “TODO” notes for more information.
This package optionally uses org-roam-dailies--capture
to open (actual or potential) daily journal entries, but it will still work without it. And even some users who do have Org Roam installed may prefer to turn off org-daily-reflection-capture-nascent-files
(which will disable the call to org-roam-dailies--capture
) in order to not create new potential journal entries for missing dates (though when org-dailies--capture
is utilised, any non-previously existing journal entries are marked as “unmodified” so they will not trigger any “unsaved file” warnings). (When org-daily-reflection-capture-nascent-files
is set to nil
, or org-roam-dailies--capture
is unavailable, it will instead just insert “missing journal entry” notes in the appropriate window.)
It also tries setting the location it uses for looking up dailies (set in org-daily-reflection-dailies-directory
) to the value of org-roam-dailies-directory
, but this variable can be manually set.
One issue (in its current beta state) is that it assumes that the journal entries are all in the directory specified in org-daily-reflection-dailies-directory
and are named <YYYY-MM-DD>.org
(e.g., 2024-08-01.org
). Though, since this is really its main requirement (it doesn’t need org-ids &c.), it should be fairly flexible/portable. Being able to customise the expected file naming is a planned feature, although there are limitations in the current form as it relies on the file-name somehow denoting day, month, and year.
Check customize
for various other options, including direction of window splits, whether leap days have special behaviour, whether or not the capture template is used to create potential (but marked unmodified) journal entries for dates without current journal entries (this only works if org-roam is available and can be disabled in any case), and (if org-roam capture templates are used) if a capture key is passed to the org-roam-dailies--capture
function.
The default time spans are “day”, “week”, “fortnight”, “month”, and “year”, but this can be customised, and it will also recognise “decade” and “century”, though this is likely of little use to most users as Org-roam was first released in 2020, (and Org-mode itself only in 2003), but potentially users might have “back-created” entries pre-dating Org-roam (or Org, or their own births). (Org-mode seems to hard-fail for dates before January 1, 100, so BCE dates certainly won’t work currently.)
Not yet on MELPA or similar.
You can manually clone/download and require
, or install with an alternative/enhanced package manager, like elpaca:
(use-package org-daily-reflection
:ensure (:host github :repo "emacsomancer/org-daily-reflection"))
or vc-use-package (probably the lightest-weight option):
(use-package org-daily-reflection
:vc (:fetcher github :repo "emacsomancer/org-daily-reflection"))
or quelpa:
(use-package org-daily-reflection
:quelpa (org-daily-reflection :fetcher github :repo "emacsomancer/org-daily-reflection"))
or straight:
(use-package org-daily-reflection
:straight (org-daily-reflection :type git :host github :repo "emacsomancer/org-daily-reflection"))
In its present state, Org Daily Reflection it relies on being told a directory which contains Org files which are all of the form <YYYY-MM-DD>.org
. (E.g., 2021-12-29.org
, 2024-08-05
, &c.), so the filename format is currently hard-coded, but future revisions may allow for other formats (though the filename would somehow).
One addition question here is possibly handling “supra-dailies”, i.e., the case where a user has multiple separate files for a single day (maybe representing hour-minute-second timestamps). Handling examining filenames with additional information is not itself an issue here, but it is not clear what should be shown in the split windows in this case. Potentially windows could be split both vertically and horizontally, and one of the splits could contain all (or as many as will fit?) of the sub-day divisions. (I’m not currently planning on tackling this as I don’t know of people with this approach, but if there are, it would be an interesting problem to ponder.)
Since this is not necessarily tied to Org-roam, it could also handle other daily journal type setups, including single-file note Org-mode datetrees. Apparently one user has managed to modify it accordingly, but I would like to include this as built-in package functionality
I would like to see if Org Daily Reflection in its current state can be used with Denote. (And possibly other non-Org-roam but Org-related Emacs multi-file note-taking setups?)
I am current user of Org Node, which itself is currently compatible with Org-roam, and plan for Org Daily Reflection to maintain compatibility with Org Node, and also to add additional optional feature to take advantage of Org Node features, such as specifying a series to query rather than looking at a directory. This should be faster on devices with potential high cost to filesystem access (not pointing fingers, but Android) and also allow for reflection on other types of series.
Paper multi-year diary image from Handwritten 1936-1940 Five Year Diary Journal of Ethel G. Taylor, Keene, NH.