Searching notes in Emacs with Deft

I have mentioned the notes system I use already. I use GNU/Emacs heavily and have come up with a neat system that fits my needs. I take notes in org-mode, commit them using git and occasionally publish them to html if I need a clean look at all of them.

For information retrieval, I use Deft in GNU/Emacs. I have it configured with the following snippet in my init.el:

;;deft for notes
(require 'deft)
(setq deft-extensions '("txt" "tex" "org"))
(setq deft-directory "~/notes")
(setq deft-recursive t)
(global-set-key [f8] 'deft)

Whenever I need to dig something up, I hit F-8 and type a string of text and that’s pretty much it. Deft recursively searches for the string and narrows the files down to the hits.

Here’s a quick gif of me searching for ‘s_client’ so I can see the exact args I need to use for openssl’s TLS client.


Publishing my (Emacs/org-powered) notes online

In the past decade, I’ve amassed a single, long file called notes.txt file that has a large amount of information I’ve gathered in my day-to-day activities at work. I use GNU Emacs exclusively to edit and search it. It is now more than 21000 lines long, and when I need to find the workaround for some obscure bug I hit several months back (if not years), the answer is always a C-s away.

Still, in an attempt to reorganize my notes, I spent my free time in the past few weeks in slicing up the file into smaller categories. I decided to properly use org-mode to format them this time. As a bonus, org-publish is a lovely way to render html pages out of them.

My workflow has also improved: I use a bookmark to open the file and just dump the content there. Later I re-file them to the appropriate section. I use deft (bound to F8) to quickly search through them.

Since they needed a permanent home, I’ve uploaded the notes to GitHub. I was happy to see that github was able to render the .org files natively. The notes are infinitely more malleable within emacs itself of course 🙂

Here are the main sections:

And here is the project in GitHub:

Update: GitLab looks really nice so I created an account and migrated my repositories there, so here’s the link for my notes repo in GitLab: