Taking notes and blogging with style

HIPSTER IMAGE

TL;DR

I explore a set-up to share notes among all my devices (namely my Laptop, tablet and smart-phone) and make them available on the cloud, plus how to even work with them from Emacs. I even show how I use the same system for blogging. If you are a OSX and Emacs use and also happen to have a device from Apple (e.g. Macbook Pro or iPhone) read below.

I have always been obsessed with personal productivity, and even though I sometimes thing that the whole thing is pointless, I keep trying to improve my "workflow" to make me more productive. Around 6 months ago I found a way to combine some applications together to take notes everywhere. Thus, I would like to share with the world.

I have separated the configuration by levels of "geekness". Level 1 is for more normal people while upper levels are more for über geeks (those which use Emacs / Org Mode). I will also show how I how use the same note taking system to even write the blog you are reading right now.

I know many of the current Org-users that read this might think I am not using the complete power of org-mode, and that org-mode offer other alternatives, but this way it is simple enough for me and everyone is free to adapt it as they want (isn't org-mode flexibility all about?).

Intro

You can safely skip this part if you want to get the set-up running. Here I just want or rant a little bit about my experience in the note taking field.

As I mentioned before, I have always been obsessed with personal productivity. In particular to-do list and note taking. Back in the days, I used simple text files for storing my notes, then I switched to personal wiki solutions like the once popular Tomboy . Then I switched to integrated solutions like org-mode . I think org-mode is pure awesomeness but I just do not like as the notes are stored and accessed. The main issues I have found when using org-mode are the following:

  • In org-mode the usual set-up implies all the notes are stored in one or some files in a tree fashion.
  • Search in Org-Mode is not as flexible and quick as I would like it to be.
  • Accessing my org files from other devices different of my computer was a PITA. and MobileOrg did not cover my needs (and was also difficult to Set-up).
  • Furthermore, Integrating org-mode although possible is sometimes too difficult or cumbersome.

However, org-mode has a lot of things that make it rock:

  • Can use the awesome Emacs to take notes.
  • Simple format for storing information that can be used with or without syntax highlight.
  • The ability to export to many formats including Latex, PDF and HTML.
  • Syntax for highlighting when exporting.
  • Executing of source code via Org Babel
  • And more, much more.

So I stared looking initially for ways to be able to access my notes from everywhere. Once I got that figured out I started looking for ways to use org-mode to takes notes while at the same time being able to have read write access from wherever I wanted. And below you will find my solution.

Set-Up

Before starting to describe I want to clarify what hardware I possess. The setup might be replicated with a different set of devices or operating system combination. I will try to add the alternatives.

  • Laptop with Mac OSX: Macbook Pro
  • Cellphone: iPhone (>=4)
  • Tablet: iPad (>=3)

(Yeah, yeah… you can call me Apple fan boy but I'm not!)

LvL 1: Notes in all devices

In order to achieve this we only need a couple of applications. Notational Velocity and SimpleNote.

Notational Velocity & SimpleNote

Notational Velocity is an open source light weight text editor with really nice functionalities. It features a simple interface with a search bar and a list of notes.

Notational Velocity

Notational Velocity

Notational Velocity allows the user to select in which directory to store the notes. So if we select a Dropbox folder we can browse it basically from everywhere.

To access the notes in other devices, I use SimpleNote (if you don't know this application you should totally check it out). Notational Velocity can sync your notes with SimpleNote. The Web version of SimpleNote is free but you have to pay for this app in order to use it in iOS device. It is cheap and totally make easier to share your computer notes with you iOS device(s).

Here is actually how SimpleNote looks on the iPad:

SimpleNote on iPad

So by using Dropbox, Notational Velocity and SimpleNote you can:

  • Take plain text notes using a free cool app.
  • Access it everywhere using Dropbox (if you need to, but this is more of a emergency).
  • Take notes online using the Simple note Web interface or any of the clients it has. Notational velocity will sync back to your hard drive and Dropbox folder.
  • Sync and take notes using any or your devices iPhone or Emacs. I guess this configuration will also work or Android based devices, but I have no experience with Android based devices. However by this point, the main idea should be clear and should not be hard to replicate.

So you can stop reading here if you are not a user of Emacs (or if this level of Geeknes is enough for you).

LvL 2: Using Emacs to take notes

OK if you are reading this that means that you are an active user of Emacs and that you want to see how you can integrate the previous Workflow with it. Well it is actually quite easy.

There is a special mode in Emacs called Deft with basically provides Emacs a similar interface for note taking as Notational Velocity does.

Deft Mode

Deft configuration is simple (add this to .emacs ):

(when (require 'deft nil 'noerror) 
  (setq
   deft-extension "txt"
   deft-directory "~/Dropbox/Notational Data/"
   deft-text-mode 'org-mode
   deft-use-filename-as-title t
   )
  (global-set-key (kbd "<C-f9>") 'deft))

This should be self-explanatory, but the important things are the :deft-directory option, which I select the same directory on my Dropbox folde. The :deft-text-mode option allows me to chose a default mode for my note files.

LvL 3: Writing a blog from everywhere

So far we have the ability of writing and reading or text or org based mode from everywhere. This can be used to write draft of posts for your blog from basically everywhere. In my personal case I use Jekyll to generate this blog. Jekyll natively support markup formats like Markdown or Textile, but you can use raw HTML as well. This last feature allows me to write my posts using org-mode format and export them to HTML. This can be easily automated by defining a project.

(setq org-publish-project-alist
   '(

     ("mf" :components ("mf-org"
                         "mf-img"))

      ("mf-org"
               :base-directory "/Users/miguel/Dropbox/Notational Data"
               :recursive t 
               :base-extension "blog.org.txt"
               :publishing-directory "/Users/miguel/Dropbox/blog-stuff/mfcabrera.com/_posts"
               :site-root "http://mfcabrera.com"
               :jekyll-sanitize-permalinks t
               :publishing-function org-html-publish-to-html
               :section-numbers nil
               :headline-levels 4
               :table-of-contents nil
               :auto-index nil
               :auto-preamble nil
               :body-only t
               :auto-postamble nil)

      ("mf-img"
               :base-directory "/Users/miguel/Dropbox/blog-stuff/source/"
               :recursive t
               :exclude "^publish"
               :base-extension "jpg\\|gif\\|png|jpeg"
               :publishing-directory "/Users/miguel/Dropbox/blog-stuff/mfcabrera.com/files/images"

               :publishing-function org-publish-attachment)



))

There are three project mf-org and mf-img and mf. With mf-org I define base directory (where I have all my notes). :base-extension tells org-mode to only take into account files ending in .blog.org.txt (So I don't publish all my notes). With :body-only I tell org to export only the body of the HTML. mf-img takes images from a directory and copies to /files/images/ directory using the function :org-publish-attachment.

This allow me for example to start writing a blog-post using my iPad (or even my cellphone) and then when I get access to a computer just format it a bit and generate it. However, this apparently has not made my blog more active. However, I will try to actually do it more often now that I finally finished my M.Sc. degrees :).

Comments? ideas? improvements? Comment or write me an e-mail.

Comments

Comments powered by Disqus