Hugo and Org, a perfect match.

/images/emacs-easy-hugo.png

This website is a static website hosted on Github Pages. I originally used Octopress along with org-export to publish my notes, but recently migrated to Hugo because of its native support for Org notes. What makes publishing even better is the emacs-easy-hugo package. You manage your notes pages just like you would normally in Org, but now previewing drafts is a simple key press (p), and publishing to Github is another (G). Since my original notes where exported from Org the migration was trivial, just adding some additional header info to my notes; easily accomplished in a few keystrokes in Emacs. The header info handles things like draft status, future publish dates, enable comments, tags, etc.

I suggest anyone publishing to Github pages from Org make the move to Hugo and emacs-easy-hugo; they are a joy to use.

Org-Brain: Concept Mapping in Org

My notes directory contains hundreds of Org files that can be quickly retrieved via search using either Deft or The Silver Searcher. The challenge however is getting a sense of the bigger picture over time, and reminding myself of old projects that might be useful to review. I have found that Org-Brain is a great compliment to Deft. Org-brain is an Emacs package that integrates with org-mode to provide concept-mapping for your notes.

/images/org-brain1.png

[Read More]

Adding Hyperlinks to Logger Output

/images/PMLogger.png

It would be nice to simply click on a debug message and have it open Emacs to the correct location in the corresponding file. There are a variety of ways to accomplish this, I chose to use terminal hyperlinks along with adding an Emacs URI protocol to my system.

[Read More]

macOS URI Protocol Handler

Strangely over the past week I ran into the need for a URI protocol handler on three different occasions. Instead of looking for three separate existing handlers that might work, I decided to write a single generic handler. The solution is a simple URI protocol router that forwards requests to shell scripts that handle the protocol requests. Below I describe some of the details; you can also find the end result on github: uri-handler.

[Read More]

Org Export Configurations

Emacs org mode offers a variety of export options that make it easy to look at your notes in different formats, or perhaps make them available for others to view. Three I use regularly are markdown, mindmap, and reveal presentation. My approach to Note Taking The best way to learn something is to sumarize the topic in your own words, in your own context, and present it to others with concrete examples. [Read More]

Deft + Org for Notes

In the nvALT and Emacs post I described an integration between nvAlt and Emacs using Deft for markdown notes. I the past year I have moved to using Deft for org notes rather than markdown notes. The nice thing about combining Deft with Org is that your notes are indexed and easy to find using Deft, but also retain all of the power of Org to orgainize and present information. For example typing decision boundary into deft quickly cuts down hundreds of org text notes to the handful that contain the words decision and boundary in them.

/images/deft-v0.6.gif

[Read More]

Org Mode ES2015+ Code Blocks (updated)

Babel 6x is a significant change from Babel 5x, as the cli is now a separate node module called babel-cli and transforms are now also delivered as separate packages. First make a few changes to the emacs environment so you can use JavaScript in org mode, as well as find local node.js modules you have installed. Replace ~/org/node_modules in the configuration below with the location of any local node modules you want to use. Using this approach you don't have to pollute the global node_module directory if you don't want to.

#+begin_src js :cmd "org-babel-node" :results output drawer
  let arr = [1, 2]; 
  let [x, y] = arr;

   console.log(x);
   console.log(y);
#+end_src

:RESULTS:
1
2
:END:

[Read More]

Org Mode ES2015+ Code Blocks

Update: I have updated instructions for installing and using the recently released Babel 6 with org mode. I use emacs org mode to keep notes including code nodes that support inline execution. It is convenient for keeping useful code snippets, as well as experimenting while taking notes. Because of features like Org + Deft it is really easy to find the sweet spot between keeping coding notes organized but also easily searched. [Read More]

Fun with Literate CoffeeScript

I have always been fascinated with the potential of literate programming; combining inline code in my notes. I have many org-mode documents that interactively execute code for various tasks and procedures. These tasks includes certain maintenance activities, or destructive operations I don't want to get wrong. I have an entire org document devoted to db maintenance, filled with Ruby code to execute complicated db queries and operations. It is nice to see the example code inline in my notes, and be able to modify the code and execute it directly in my notes. [Read More]