Zettelkasten is a note-taking technique designed to keep, and create new links between all the notes as they are written. This allows them to develop over time, link to various different topics and allow the notes to grow into a network over time. This helps draw connections between different fields.
This emacs mode is meant to allow for a very simple wrapper over linked text files. By default,
org files are used, which are linked through simple file links. The name of the file that is
created is just a unique ID.
Each file can then link to other files and they can easily be browsed through in emacs.
This mode is completely standalone, it does not require any other tools so is easy to install, use and edit appropriately.
This repository contains two packages which are also on Melpa, and are separate from each other,
giving two different ways to use the Zettelkasten method in Emacs. One (
org-mode, and the other (
zettelkasten) is an
implementation from scratch, which can either use
org-mode files or markdown files as a base.
Tag search can be implemented using your favourite completion framework. These will use the
the current heading and will look for any other notes that reference this heading (i.e. it will find
all the back links of the current heading).
(defun org-zettelkasten-search-current-id () "Use `counsel-rg' to search for the current ID in all files." (interactive) (let ((current-id (org-entry-get nil "CUSTOM_ID"))) (counsel-rg (concat "#" current-id) org-zettelkasten-directory "-g *.org" "ID: ")))
(defun org-zettelkasten-search-current-id () "Use `consult-ripgrep' to search for the current ID in all files." (interactive) (let ((current-id (org-entry-get nil "CUSTOM_ID"))) (consult-ripgrep org-zettelkasten-directory (concat "[\\[:]." current-id "\\]#"))))
(define-key org-zettelkasten-mode-map (kbd "s") #'org-zettelkasten-search-current-id)
The method implemented in
org-zettelkasten has been described in detail in a blog
org-mode features such as
(add-to-list 'load-path "/path/to/org-zettelkasten.el") (require 'org-zettelkasten) (add-hook 'org-mode-hook #'org-zettelkasten-mode)
use-package from Melpa**
(use-package org-zettelkasten :ensure t :config (add-hook 'org-mode-hook #'org-zettelkasten-mode))
To use Zettelkasten, first create a directory which will contain all your notes. This will be a flat directory, as tags are used to place notes into specific categories.
Then, you can activate the mode as follows:
(add-to-list 'load-path "/path/to/zettelkasten.el") (require 'zettelkasten) (zettelkasten-mode t)
use-package from Melpa**
(use-package zettelkasten :ensure t :config (zettelkasten-mode t))
A new note can be created using
To link to a note from the current note, use the following command:
which will open a list of available notes which you can choose to link to.
To open a parent note of the current note, the following command can be used:
This opens the chosen parent note from a list of available notes. This is bound to
C-c k p by
The default keymap for the mode is
C-c k, this can easily be changed though by editing
||Create a new note and optionally link it to a parent. This can be disabled by using a prefix argument.|
||Insert a link to a note.|
||Choose from a list of parents of the current note and open the note.|
||Open a note from anywhere, using auto complete on the ID or TITLE of the note.|
||Open a note using a tag as the first identifier.|
An alternative to use Zettelkasten in emacs is Zetteldeft, which uses Deft as a backend to search files.
Another beefier alternative is org-roam, which is a fully integrated note taking system based on a wiki-system.
Finally, org-brain is a similar note-taking system that is meant for concept mapping in Emacs.