Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created May 25, 2011 09:48
Show Gist options
  • Save mrvdb/990682 to your computer and use it in GitHub Desktop.
Save mrvdb/990682 to your computer and use it in GitHub Desktop.
Journaling setup

Journaling setup in orgmode

Here’s the info about setting up the journaling system.

The entry for the journaling template I use is this:

(setq org-capture-templates
      (quote (
	      ("j" "Journal" 
	       plain (file+datetree (concat org-directory "journal.org")) 
	       "___________________________________________________________ *%U* ___\n%?\n" )))
)

The trick for the time display is to define the variable org-time-stamp-custom-formats and have the journal file include a line like #+STARTUP: customtime.

The %U specifier in the template normally inserts the date plus time. I have adapted the custom time format specifier so that the second part of the variable just formats the time and not the date.

A downside of this is that all datetime fields in the journal.org file will be displayed as time only. I’m looking into the %<...> (not in the manual, seems to format a generic time-string) specifier or the %(sexp) specifier the custom time adaptation is not necessary.

Other than the above I don’t think it needs anything special.

@SkydiveMike
Copy link

Excellent and thank you. I didn't know about org-time-stamp-custom-formats at all.

Also a very simple C-c C-x C-t toggles between the "normal" timestamps and the custom format overlay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment