Zettelkasten

Latest Posts

The Archive Turns 2 Years Old

The dominating topic of this month is COVID-19. Nevertheless, The Archive is celebrating. We don’t let pessimism grip us and carry on.

Last week, on March 15th, was The Archive‘s 2nd anniversary. Just like we’re all supposed to not celebrate big birthday parties or gather for festivities in general, this year’s app anniversary is toned way down as well. Here’s to what has happened in the past year.

screenshot of the Archive
The latest version of The Archive, demonstrating tabs and the new overall look, still looks great with the user-submitted theme “Pretty Functional” by @Basil

In a nutshell, The Archive changed a lot in the past year. We’ve now got multi-tabbing and multi-windowing, for example. Around last year’s anniversary, the browser-like navigation began to land, too. Both features affect the way people work with notes quite a bit! Scripting is next on the list and due to become this year’s big milestone.

Here’s a link to check out The Archive if you don’t know the app, yet.

But the real star of the past year in this part of the interwebs isn’t the app.

It’s the community of Zettlers. Or Zettelnauts; this case for the name isn’t yet decided 🙂

screenshot of the forum
The forums are buzzing with activity

To see what has changed, just take a look at the forums. There are now 772 discussions in total, and the community currently clocks in about 10 replies per day, on average. There’s a lot of interesting discussions about software, workflows, and automation. People explore new ideas and openly share their approaches. The overall tone of the discourse is sugary sweet: We don’t even need to moderate at all. Everyone is already being genuinely helpful on their own account.

The practice of the Zettelkasten Method is evolving as well. For one, the world-wide community of Zettlers is beginning to produce information material, scripts and applications to improve everyone’s life. It’s easier than ever to find Zettelkasten resources; I can hardly keep up storing bookmarks of everything (also see the global #zettelkasten bookmarks). Interesting developments include Andy Matuschaks auto-backlink-management script that is compatible with every folder of plain text files: Run it regularly to keep an up-to-date list of backlinks in your notes. This approach to scripting is a game-changer. It’s augmenting what a simple text editor can do. Then there are experiments to unify date-based Zettel IDs with Luhmann’s approach to nest notes – which, oddly, was totally unprecedented until late! There also now is a growing Zettelkasten subreddit where people share and use even more fringe plain text approaches using vim and emacs.

So for knowledge workers in general and Zettelnauts in particular, the past year was good, the mapped territory of all things Zettelkasten expanded, and we all were gifted with very interesting new ideas and development. Thanks to you all for your contribution!

Stay safe everyone, and stay tuned for belated anniversary gifts to trickle in.

Make [[WikiLinks]] Clickable in Marked 2

In the forums, @mjknight shared a Marked 2 preprocessor script that you can use to transform non-standard [[wiki link]] to become regular Markdown links that you can click on.

  1. Save the script below to a convenient location, e.g. ~/scripts/marked_wikilink_preprocessor.rb.
  2. Open Marked 2 and head to the app preferences.
  3. In the “Advanced” tab, select “Preprocessor and paste the path to your script.
Marked 2 preferences screenshot
Type in the path to your preprocessor script; that’s why you should use a simple path :)

Marked will expand the path, so in my case ~/scripts/marked_wikilink_preprocessor.rb becomes /Users/ctm/scripts/marked_wikilink_preprocessor.rb and it shows a faint “OK” next to the path text field.

screenshot of Marked 2
See how my David Epstein structure note displays clickable links. Note the resolved URL at the bottom

With these settings, you can open a note from The Archive in Marked and you can click [[wiki links]] to navigate around in The Archive. Upon hovering, it’ll show the URL scheme for “matching”, aka searching and showing the best match, which is the same thing The Archive’s internal wiki links do.

Marked preprocessor script

#!/usr/bin/env ruby

def class_exists?(class_name)
  klass = Module.const_get(class_name)
  return klass.is_a?(Class)
rescue NameError
  return false
end

if class_exists? 'Encoding'
  Encoding.default_external = Encoding::UTF_8 if Encoding.respond_to?('default_external')
  Encoding.default_internal = Encoding::UTF_8 if Encoding.respond_to?('default_internal')
end

begin
  input = STDIN.read.force_encoding('utf-8')
rescue
  input = STDIN.read
end

input.gsub!(/\[\[(.*?)\]\]/) do |m|
  match = Regexp.last_match
  link_target = match[1]
  "\[\[[#{link_target}](thearchive://match/#{URI.escape(link_target)})\]\]"
end

print input

Emulate Automatic Link Suggestions in Your Note-Taking App and The Archive

If your note-taking app of choice doesn’t support auto-completion to suggest links while you type, what can you do?

Denote a link with double square brackets, but nothing happens. What to do?

Not all software can implement the exact same feature that I’d like it to have. Then I try to figure out ways to use a tool to do what I want, breaking down the feature into more basic steps, each of which I could do manually, if needed. This works surprisingly well most of the time.

Let’s figure out the options you do have if you want to add a link from A to B, but don’t know the ID of B, yet, only parts of its title. How can you and your software of choice work together to create a link?

For example, Sascha and I have been using nvALT to great success with a couple of AppleScripts to automate Zettel ID creation, even though there were no clickable links to navigate our notes. You may recall we have been advocating to manually follow links when your app doesn’t allow clicking on them by simply searching for the ID. We ate our own dogfood, telling folks that links are just a more convenient way to perform a search, and we worked in that exact way for years until we switched to our own app.

What is a similar manual process replacement for auto-completion of links? What can you break this feature down into, and how can your note-taking software help get the job done?

In an ideal app, you would select the link target from a list that pops up while you type.

You could call this feature “auto-completing” of links or “link suggestions”. In the convention to place inter-note links via [[wiki links]], that could mean you type the two opening square brackets, [[, and then expect the app to offer some user interface widget to help you find what you are looking for right there, right now.

This can be broken up into these steps, that we’ll examine individually in a second:

  1. Denoting a link. That’s you typing [[ before and ]] after the linked word.
  2. Finding a link target. Visually, that often boils down to a search widget as a popup that doesn’t affect your currently selected note. In other words, it’s a new, independent search context.
  3. Inserting the link target between the square brackets.

In the worst case, step 1, denoting a link, means hitting the keys on your keyboard: two pairs of square brackets. Some apps provide the closing bracket for you, so it’s either 4 or 2 keystrokes.

In the best case, the “insert link here” command could be a shortcut that saves you from typing all 4 characters.

Honestly, I don’t think this step is a hurdle. Typing the brackets is simple, and I also prefer it to memorizing a shortcut for this simple task. Next.

To find a link target is the actual auto-completion or link suggestion part.

If your app of choice doesn’t offer a widget for this that pops up, what can you do? Are you screwed?

Not at all: You can still manually search for the target note!

“But if I search in my archive, I’m taken away from the note I want to edit!”, you may cry out in despair. Good point.

A link suggestion widget is actually creating a temporary search context for you. You can abort it, nothing happens; you can confirm the selection, and the link is inserted for you. The main app, your current note and the main search, are not affected.

You can emulate the result to some degree with a few simple tricks.

Recall how Sascha and I have manually done the work of the computer to follow links: select the linked-to ID, copy it, got to the search bar, paste the copied ID, and then look at the resulting note.

For link auto-completion, you can do the same and perform each step manually. You will want to do this in a way that allows you to restore the current context. Here, this means to get back to the note you are editing before you leave and search for another note to link to.

Metaphorically, you want to leave a finger or a bookmark between the pages of your notebook to quickly get back there. To achieve this, employ the Q-trick: type qqq right where your cursor is to leave a temporary jump mark. That’s a unique search term. Later, you can search for “qqq” and get back to the exact place where you left the unfinished note. Then you remove this temporary bookmark string again and end up more or less where you left off.

So this step boils down to these actions:

  • Make the current context restorable. We can use to Q-trick for that, inserting qqq in the place of the link.
  • Search in your archive as usual to find the note you want to link to.
  • Copy the ID of the note.
  • Restore the context, e.g. by searching for qqq.
  • Remove the temporary “qqq” from the note once you reach it.

In an automated feature, the work of the computer would be to type text between the square brackets for you.

With the manual work you just completed in the previous step, this boils down to pasting the ID from your system clipboard. That’s it. ⌘V.

Ways to preserve and restore context in The Archive

I was inspired to write about this manual and technique in part because our beloved users of The Archive request the auto-completion to be added as a feature.

We do understand that this is useful and saves some time and effort – after all, the manual process outlines above is a bit tedious at first, though you get used to it with time. The Archive doesn’t support this exact feature, yet.

Get used to use tabs for temporary search contexts. Learn the shortcuts to become super fast at this.

But The Archive does come with a couple of other features that you might not have thought to be useful for this purpose:

  • The navigation history preserves context as well: from the note you are editing, you can just start a new search and look around until you find the target. Then you hit the “Back” button (Cmd-Ctrl-left arrow) until you get back to where you left off. Paste the ID, and you’re done.
  • Tabs and multiple windows are a very literal implementation of independent search contexts. You can skip the Q-trick completely and open a new tab, search for the link target to your hearts content, copy its ID, then close the temporary tab again and paste the ID. The original tab will not be affected at all: the editor still looks the same, and if you left the cursor between the square brackets, you can simply hit Cmd-V to paste the ID directly.

Multiple tabs are already very close to a dedicated auto-completion widget. They are displayed differently, but underneath, the same thing is happening: the search is isolated from your current editing session. You have to copy and paste the link ID manually, true, but that’s all there is left for you to do.

Concluding

I find it helps to conceptualize features and problems in a way that may look rediculously fine-grained.

To come up with manual solutions for a lack of computerized features, I find that the practice of Wizard-of-Oz Software-Demoing helps. There, you design features and specify user input and expected output on the device; but instead of coding an app to do it, you secretly perform the requested task manually. If you can imagine to manually simulate the result a computer doing the work, then you have already broken down a software feature into simple steps that you can do in any app.

If you try to break down killer features of your favorite software this way, I bet you’ll figure out ways to get a similar result that’s at least 80% as good by doing some things manually. Why would you bother, though? – Well, the upside of coming up with this is that you learn to become independent from specific software.

You’re not helpless when you have to retrieve your data from a backup on a computer that doesn’t have your favorite app, or operating system, installed.

Software agnosticism is really a mindset where you stay in control as much as you can. The bonus of control is that you not give up your autonomy willy-nilly by getting used to a particular app too much.

As you know, infatuation with a particular software solution may end in heart-break and pain when you discover it isn’t going to be developed any longer and your data is locked away. We want to help you avoid this pain, and I hope this exercise helps!

You Should Read David B. Clear’s Summary of the Zettelkasten Method

Sketch of a Zettelkasten
Image courtesy David B. Clear, CC BY-SA 4.0

At the turn of the decade, David B. Clear1 wrote a summary about all things Zettelkasten, called “Zettelkasten — How One German Scholar Was So Freakishly Productive”.

It’s a great post, especially if one is just starting out with the Zettelkasten Method. There’s so many highlights there, like:

You get that? The linear recording of information, as in a notebook, sucks. Non-linear notetaking [sic!], and especially graphs and concept maps, rock. And what is a Zettelkasten if not one massive graph or concept map?

And concise metaphors and explanations:

By using the Zettelkasten method, your notes become entities that are knitted into a larger web of ideas. Instead of the system deteriorating the more you add to it, it becomes better. Again, it’s like your brain. No one would suggest that having more neurons would make you dumber. It’s the same with the Zettelkasten. More notes means more ideas and more connections, and the more ideas and connections you have, the “smarter” your Zettelkasten becomes and the more insightful your writing will be.

Saying that the Zettelkasten becomes smarter is not just poetic language. Luhmann meant that quite literally.

Promises of the Zettelkasten Method David summarizes include:

  • You’ll focus better
  • You’ll be less frustrated
  • You’ll waste less time
  • You’ll think better
  • You’ll be more productive
  • You’ll be more creative

His list of principles reads like lyrics: “add notes without fear”, “never delete”. Really, we love the post, and think y’all should be pointing your eyeballs at it. Read David’s post on Medium.


  1. I hope that’s his real name, because “B. Clear” is just too awesome. 

Insert a List of Backlinks Into All Your Notes

Andy Matuschak shared a script called note-link-janitor with us the other day that maintains a list of backlinks in all of your Markdown notes.

And yes, by “maintains” I really mean “maintains”: if it doesn’t exist, it adds a ## Backlinks section at the end of each Zettel with a list of incoming links, and it updates the section on subsequent runs. This means you can run the script as often as you’d like, and it always produces an up-to-date result – as opposed to, say, naively adding a new ## Backlink section time and time again. When you run the script regularly, you’ll always have an up-to-date backlink list in your notes. Neat.

On the flip side, it deletes any customizations you add to these sections as well, so you better not write in them.

Please test the script on a copy of your notes, because there is no undo, and make backups!

I ran it on a copy of a subset of my notes from the David Epstein videos and on the note 201910011532 Computational thinking, it inserted one link, plus a copy of the phrase it was found in:

## Backlinks
* [[201711181848 Separation of Concerns]]
    * [[201910011532 Computational thinking]] is about separation of concerns

The script does find [[wiki links]], but only finds the files when the whole filename is inside the square brackets.

  • This link is recognized: [[201910011532 Computational thinking]]
  • This is not: [[201910011532]] Computational thinking

On the upside, there’s hope for a less precise search since the script is open source. (It is written in JavaScript/TypeScript.) Anyone can volunteer to change the file name resolver algorithm to add an option to make it work with partial matches in file names.

Check out note-link-janitor on GitHub.

Beginnings of Bryan Kam’s Zettelkasten Journey

Bryan Kam wrote two posts about his embarking on a Zettelkasten journey in recent months. Especially if you’re getting started, posts like his can be a nice place to get inspiration and a feel for the early days.

In his first post, he talks about his understanding of the method as a “methodology for thinking in writing.” Which is a pretty apt summary of one of its benefits already. He also draws connections to Getting Things Done, which I’d argue the Zettelkasten Method is not an alternative, but an extension of for personal productivity. Either way, Bryan lists a few core principles and their immediate, actionable results. For example this:

Each “zettel” (aka note) can only contain a single thought. […] Massive interlinking. […] The size limit encourages the recording of inchoate thoughts, to be developed by their relationships. If they’re not linked strongly enough, they may be lost forever in the network. (Less likely in software, but still possible, if you forget to link/search. Also sounds sort of like your brain, doesn’t it?)

I wrote the following on the topics mentioned here: the principle of atomicity and one of the early posts about building a second brain.

A month later, he wrote a follow-up to his post with reflections on the process, and a very nice graphical visualization of note connections. One gem from that post:

The biggest benefit seems to be that a wider variety of thinking is closer to the surface of my mind at all times. I feel that I think more clearly and can make better analogies. I also feel more confident that I have mastered the material I’ve read (or alternatively, that I know when I haven’t understood, and need to learn more before returning to the material).

A second benefit is the serendipity that Luhmann and Ahrens predict. I often find notes that I’d forgotten about, either by a search or by realising that one note connects to another, then finding more links on that note. This produces novel and insightful connections.

So go ahead and read Bryan’s first and second post to immerse yourself further in the Zettelkasten experience!

Thinking Outside Experience” - David Epstein: “Range” - Book Processing Ep 06

This chapter’s outline started out was pretty short – and most of the stuff that I did add was anecdotes and stories. Interesting stories, sure, but nevertheless not much to brag about in front of your friends who study humanities. The actual sources will be interesting, but I didn’t get to them this time.

Instead, I decided to go with placeholder notes: I added the stuff from Epstein’s account and a reference to the original, but also left a note to myself both in the note (as a warning!) and in my to-do-list so I knew this is not supposed to be the end of that particular branch.

Still, the visualization from the structure note looks interesting:

After this chapter, it looks less like an onion with many layers because it grows an appendix of sorts.

Learning, Fast and Slow” - David Epstein: “Range” - Book Processing Ep 05

By accident, I started this episode with an outline that was surprisingly long and lended itself well to my favorite Zettel refactoring, called “Extract Zettel”, where I take part of an existing note and put it into a new one, leaving a link in place of the cutout.

Took me 3 weeks to get into the groove, and since last time things flow quite smoothly as I hunt for precious information in this journalist’s take on a complex topic.

The web of notes after episode 5 shows a second layer around the core, like an onion