Adapted from http://www.emacswiki.org/PersonalDiary
Functions to maintain a simple personal diary / journal in Emacs. Feel free to use, modify and improve the code! — mtvoid, bastibe
This file is also available from marmalade under the name
installing, add the line
(require 'org-journal) to your .emacs or
init.el to activate it. You also need to specify the directory where
your journal files will be saved. You can do this by setting the
org-journal-dir (remember to add a trailing slash).
org-journal-dir is also a customizable variable. The default value
You can add all those calendar files to your org-agenda by adding
org-agenda-files and setting
org-agenda-file-regexp to include files with an all-numeric name
\\`[^.].*\\.org'\\|[0-9]+). That way, you can use org-agenda to
search for TODO items or tagged items in your org-journal.
Inside the journal directory, a separate file is created for each day
with a journal entry, with a file name in the format YYYYMMDD. Each
journal entry is an org-mode file that begins with a date entry on the
top, followed by a entries for different times. Any subsequent entries
on the same day are written as additional headings in the same file,
with their own time. To start writing a journal entry, press
You can customize the date and time formats using the variables
org-journal-time-format. If you do not
want to use org headings and sub-headings for date and time entries,
example, you could set
order to begin every file with a title instead of a heading. If you
want to store your journal entries with different file names,
org-journal-file-format and make sure that
org-journal-file-pattern matches this format (the pattern is used to
mark the calendar entries).
You can browse through existing journal entries on disk via the
calendar. All dates for which an entry is present are highlighted.
j will open it up for viewing. Pressing
select the date with the previous or next journal entry, respectively.
i j will create a new entry for the chosen date.
To create a new journal entry:
In calendar view:
jto view an entry
i jto add a new entry
[to go to previous entry
]to go to next entry
When viewing a journal entry:
C-c fto view next entry
C-c bto view previous entry
A typical journal entry for a day would look like this:
(it will actually look a lot nicer, depending on your org-mode settings)
* Tuesday, 06/04/13 ** 10:28 Company meeting Endless discussions about projects. Not much progress ** 11:33 Work on org-journal :org-journal: For the longest time, I wanted to have a cool diary app on my computer. However, I simply lacked the right tool for that job. After many hours of searching, I finally found PersonalDiary on EmacsWiki. PersonalDiary is a very simple diary system based on the emacs calendar. It works pretty well, but I don't really like that it only uses unstructured text. Thus, I spent the last two hours with making that diary use org-mode and represent every entry as an org-mode headline. Very cool! ** 15:33 Work on org-journal :org-journal: Now my journal automatically creates the right headlines (adds the current time stamp if on the current day, does not add a time stamp for any other day). Additionally, it automatically collapses the headlines in the org-file to the right level (shows everything if in view mode, shows only headlines in new-entry-mode). Emacs and elisp are really cool! ** 16:40 Work on org-journal :org-journal: I uploaded my journal mode to marmalade and Github! Awesome! ** TODO teach org-journal how to brew coffee :org-journal: