Emacs notes: Select paragraph and browse-kill-ring for effective content capture

I like to have any reading material and my notes side by side1. This is easily done with Emacs by splitting the buffer vertically (C-x 3)2

For example: Once a link has been opened via w3m, I hit org-capture (C-c) with a preset template that grabs the URL to the article along with the created date in the properties, with the cursor in position ready to take notes.

(setq org-capture-templates
'(("l" "Link + notes" entry (file+headline "~/my_org/link_database.org" ".UL Unfiled Links")
	 "** %? %a ")))

The snippet above is activated by the command ‘l’ and is listed with the title Link + notes in the agenda. It captures the link of the file being viewed as the heading and allows further notes to be inserted below. This is stored into the file link_database and under the specified heading .UL Unfiled Links.

It is also possible to capture a highlighted chunk of text to be added under the heading mentioned above. That would look something like:

(setq org-capture-templates
	'(("e" "Snippet + Notes" entry ;; 'w' for 'org-protocol'

	 (file+headline "~/my_org/link_database.org" ".UL Unfiled Links")
	 "*** %a, %T\n %:initial")))

Now I have the capture buffer and the viewing content side by side, by calling C-c l. I can browse through the article use the mark-paragraph function (conveniently set to M-h) can be used to select and copy (M-w) entire paragraphs or alternately use C-spc to select lines of interest from the article them to the kill ring. The figure below depicts how it looks for me:

Emacs content capture and buffer split

It is now possible to continue highlighting interesting lines / paragraphs and copy them, which adds them to the kill-ring. Once the article is done with, I switch over to the capture buffer and hit M-x browse-kill-ring, which brings up a pop-up buffer with all the items in the kill-ring3. Once called, I can hit n to move to the next item, and hit ‘i’ to insert the current item at the cursor location. It is also possible to append / prepend/ edit the item before yanking. All the available shortcuts can be found using ‘?', while in the browse-kill-ring buffer.

The above methodology curiously enables me to ensure capturing atleast some details of interest from an article / source, and also serve as a quick revision of the read content before filing it away.

One issue with the above workflow is that while reading multiple articles, there is a chance of mixing up the content being captured from different articles. This could be solved by using ‘x’ in order to pop items out of the kill ring in the selection process above. However, it seems excessive to clear the entire kill ring for each article read. On the other hand, it could promote a focused workflow.

Additional possibilities:

  • To view pdf files side by side and capture notes is via the Interleave package.
  • The org-web-clipper concept outlined here is also very convenient to rapidly capture entire webpages being browsed in w3m.

Further reading:

  1. Sometimes, this procedure has to be set specifically. Some good discussions on SO : link1, link2. However, at times horizontal splitting is useful. Therefore, I would rather not set a 0 width-threshold enabling only vertical splitting. lisp (setq split-width-threshold 75) (setq split-height-threshold nil) ↩︎

  2. C-x essentially means Control + x. M-x or Meta-x is Alt + x ↩︎

  3. The browse-kill-ring package can be installed via MELPA. (M-x install package) ↩︎