Logging Food With Org-mode

For some reason I enjoy recording what and where I eat. Usually I do this in a paper notebook, but I decided try it using Org-mode files instead.

To make entry as easy as possible, I created a new capture template.

1
2
3
4
5
...
("F" "Food Log" entry
        (file+datetree+prompt "~/org/food.org")
                "* %?\n%t\n%^{Meal}p%^{Type}p")
...

Now, I can type C-c c F to bring up the capture template and quickly fill in details about a meal. This is then saved automatically in my ~/org/food.org file and put in the proper location, organized by date. It looks like this so far…

Food log

The %^{Meal}p and %^{Type}p parts of the capture template are for setting “Properties”. In this case I am asked to enter the Meal and Type properties. Properties allow Org-mode to act like a rudimentary database. Switching to Column view shows a table of the values for each property, like this:

Column view

I’m including an active timestamp with each entry (using %t in the template) so that they will be included in Org’s Agenda for that day.

There’s no real need to log my meals, but Org-mode makes it quick and painless so why not?