[[!meta title="Zettelkasten for Regular Emacs Hackers"]] [[!meta copyright="Copyright © 2025 Christian Tietze"]] [[!inline pages="internal(2025/info/zettelkasten-nav)" raw="yes"]] # Zettelkasten for Regular Emacs Hackers Christian Tietze (he) - [@ctietze@mastodon.social](https://mastodon.social/@ctietze) , [[!inline pages="internal(2025/info/zettelkasten-before)" raw="yes"]] There's this one thing you can do with your Emacs that is not chiefly a technological problem to solve: thinking through writing. Emacs offers a malleable environment where you can tweak every key stroke, and every pixel on screen to your needs. Since we're all here at EmacsConf, the intention is clear: to use and enjoy Emacs, and spend our lives in this amazing environment. While it's easy to ditch modern UI conveniences and pull technology like email, chat, database and server management, and editing book drafts into Emacs – well, these are tasks that have been implemented, for which there exist alternatives, and which you can teach Emacs to do in a similar way. Oversimplifying: we can copy and tweak existing solutions and have a good life. Now while everyone's email needs to use the same protocol, everyone's approach to _thinking_ is different. There's no cookie cutter solution to merely rewrite in Emacs Lisp. We all need to figure out how to do this on our own, and then find an implementation that suits our needs. (Including using paper, but we're not talking about paper here.) **This is where I want to show you one simple foundational method to deep thinking, understanding, and problem solving:** create yourself a Zettelkasten, an environment of linked notes that scales well over decades, so that you can take it with you into retirement and beyond for a lifelong journey of learning. For this presentation, I merely assume that you agree that writing improves the quality and depth of thought. I also assume that you know how to type and move around in Emacs. The rest is just convention, and we'll walk through a couple of examples and exercises together so that after this talk, you're equipped with the simple tools that help you unlock new insights in your future. ## About Christian Christian is a macOS/iOS developer with a strong focus on user experience and clean architecture. Driven by a passion for accessibility and performance, Christian has shipped many apps and authored three technical books and 895+ blog posts, helping developers world-wide to realize their app ideas with a deep understand for the technologies they use. In 2013, Christian wrote about the Zettelkasten topic on his own personal blog and eventually moved everything over to where he and Sascha continue to teach and write. ## Code and Notes from the Talk ### Minimal Emacs + Denote Configuration This is the relevant configuration Christian used in the Emacs demo. Save this to a folder as `init.el`, and launch via: $ emacs -nw --init-directory . init.el `init.el` contents: ```elisp (load-theme 'modus-vivendi-tinted) ;; Dark theme to match dark slides (menu-bar-mode -1) ;; Disable topmost menu bar (package-refresh-contents) (use-package denote :ensure t :hook (dired-mode . denote-dired-mode) :bind (("C-c n n" . denote) ("C-c n r" . denote-rename-file) ("C-c n l" . denote-link) ("C-c n c" . denote-link-after-creating) ("C-c n b" . denote-backlinks) ("C-c n d" . denote-dired) ("C-c n g" . denote-grep)) :config (setq denote-directory (expand-file-name "./notes/")) ;; Automatically rename Denote buffers when opening them so that ;; instead of their long file name they have, for example, a literal ;; "[D]" followed by the file's title. Read the doc string of ;; `denote-rename-buffer-format' for how to modify this. (denote-rename-buffer-mode 1)) ;; For the demo, I forced notes to show in full screen by default. (setopt display-buffer-alist nil) (add-to-list 'display-buffer-alist '("^[D] " ;; Denote buffer name prefix (display-buffer-reuse-mode-window display-buffer-full-frame) )) ``` ### Notes created during the demo These are the notes Christian created during the recording. The recording was sped up 3x--4x, so this could be nicer to read than having to squint at the video: #### `20251121T204827--mechanics-and-habits-to-use-a-zettelkasten__zettelkasten.org` ```org #+title: Mechanics and habits to use a Zettelkasten #+date: [2025-11-21 Fri 20:48] #+filetags: :zettelkasten: #+identifier: 20251121T204827 Essential: - Write: put in effort; [[denote:20251121T205045][GIGO]] - Connect: Link notes to create trails - Correct: Improve as you go Additional: - Design for use: give things a purpose, e.g. blog about it - Create structure. [[denote:20251121T205312][Types of structures in a Zettelkasten]]: design new entry points and trails - Start in the Zettelkasten: use the system to learn, make it grow, get better - Start with a link: keeps your notes connected. [[denote:20251121T210416][Create notes as link first to avoid orphans]] Tool doesn't matter as much. Small files are good. [[denote:20251121T210107][Use Denote in Emacs]] (Christian Tietze: Zettelkasten for Regular Emacs Hackers, EmacsConf 2025) ``` #### `20251121T205045--gigo__programming_quality.org` ```org #+title: Garbage in, garbage out #+date: [2025-11-21 Fri 20:50] #+filetags: :programming:quality: #+identifier: 20251121T205045 The principle known as "Garbage In, Garbage Out" (GIGO) in computer programming states that for any system, the quality of output is directly depending on the quality of input. See: https://en.wikipedia.org/wiki/Garbase_in,_garbage_out ``` #### `20251121T205312--types-of-structures-in-a-zettelkasten__structure_zettelkasten.org` ```org #+title: Types of structures in a Zettelkasten #+date: [2025-11-21 Fri 20:53] #+filetags: :structure:zettelkasten: #+identifier: 20251121T205312 Non-comprehensive list of structures that could be used in a Zettelkasten: - Opposition pair: 1 note for the pair, 1 note per position/opposition each; pro/contra - Table of contents: list of topics/headings - an outline for a writing project - recreation of a book's contents (so I can write in detail about the book); - Argument: recreation of a distilled form to get to a conclusion; list premises and evidence, and how these support the conclusion - Counter-argument: address parts of the original argument to support another view and test the argument's strength - Table of things - Graphics, like a concept map, Mind-Map, diagram: visually bring elements into a relation, then write about the relation and the elements Metaphors: - Iceberg: visibile tip with hidden depth; someting that appears small but is large; good metaphor for obstacles - Black box: focus on inputs and outputs, and ignore the 'how' in the middle - e.g. most Emacs Lisp functions (hoping the documentation is good) - [[denote:20251121T205739][Atom, molecule, organism]]: how small parts compose to larger parts, which compose to even larger pieces (Christian Tietze: Zettelkasten for Regular Emacs Hackers, EmacsConf 2025) ``` #### `20251121T205739--atom-molecule-organism-metaphor__composition_recursion.org` ```org #+title: Atom, molecule, organism metaphor #+date: [2025-11-21 Fri 20:57] #+filetags: :composition:recursion: #+identifier: 20251121T205739 Atom: smallest part, indivisible elements Molecule: comprised of atoms; structure added to combine elements Organism: comprised of molecules; different level of analysis, irreducible to molecules/atoms This can be used e.g. for programming: functions compose into larger functions which compose into packages. Actual biological organisms also work in such a way. Organs are part of bodily functions (high abstraction), but from a chemical or physical perspective, you can decompose them into atoms. That doesn't tell you anything about the organ's function. ``` #### `20251121T210107--denoteel-for-zettelkasten-in-emacs__denote_emacs_zettelkasten.org` ```org #+title: Denote.el for Zettelkasten in Emacs #+date: [2025-11-21 Fri 21:01] #+filetags: :denote:emacs:zettelkasten: #+identifier: 20251121T210107 While not shipping with Emacs out of the box, Denote is easy to install and a great start to manage notes: - it comes with unified way to create new notes, and hides time-stamped ID's with "[D]" in buffer lists - it can manage links, and show incoming links to notes ("backlinks") - it supports quickly adding links, and creating links _first_ out of the box -- it just creates the note immediately, so you don't notice - [[denote:20251121T210416][Create notes as link first to avoid orphans]] * Example configuration #+BEGIN_SRC elisp (use-package denote :ensure t :hook (dired-mode . denote-dired-mode) :bind (("C-c n n" . denote) ("C-c n r" . denote-rename-file) ("C-c n l" . denote-link) ("C-c n c" . denote-link-after-creating) ("C-c n b" . denote-backlinks) ("C-c n d" . denote-dired) ("C-c n g" . denote-grep)) :config (setq denote-directory (expand-file-name "./notes/")) ;; Automatically rename Denote buffers when opening them so that ;; instead of their long file name they have, for example, a literal ;; "[D]" followed by the file's title. Read the doc string of ;; `denote-rename-buffer-format' for how to modify this. (denote-rename-buffer-mode 1)) #+END_SRC ``` #### `20251121T210416--create-notes-as-link-first-to-avoid-orphans__linking_zettelkasten.org` ```org #+title: Create notes as link first to avoid orphans #+date: [2025-11-21 Fri 21:04] #+filetags: :linking:zettelkasten: #+identifier: 20251121T210416 Recommended practice by Christian Tietze: start a new note with a link first from some place, any place, then create the file to match that link (which would initially lead nowhere). - Reduces orphans in the Zettelkasten by guaranteeing every note to have at least one link. - Supposedly teaches you to think about possible connections early, which makes the network better. A very loosey-goosey approach, when taken literally and used liberally: it doesn't matter where you are, just leave a forward link to something you wish existed. Even if it doesn't fit the current note. After all, you came up with the idea just now -- so maybe there's a connection that you just can't spell out, yet? ``` ## Discussion / notes - Q: I wonder what they use for the fancy animations (what is your presenation software stack?) - A: Apple Keynote -- sorry for the proprietary product, I'm just fastest with that. PowerPoint also works, and when PowerPoint can do, LibreOffice can also do. It's more about sticking to a few simple transitions and timings, like fading and directional movement/wiping, and you're good. Read "slide:ology", that's amazing and full of great examples. - Q: Are you not a fan of using *, **, *** headings in org-mode?  (It's interesting to see how people have different styles of writing org content.) - A: Didn't see a need for hierarchical structure for the presentation. Also I'm leaning towards sequential writing, i.e. 'notes as blog post' pattern, or in our technical terms: "A Zettel should be like a StackOverflow post: a self-contained answer, specific to the question, with references to learn more if needed." An outline doesn't fit that well. - Fair enough.  Thanks. - Q: can you use org files and all its features inside denote? - A: Yes, this is an org file and Denote uses Org headings. - Q: Where/how do you like to capture fleeting notes? - A: Uses small paper notes. (Also don't get hung-up on terminology like this please :)) - Q: Zettelkasten feels like a very "cagey" approach to note-taking and knowledge management. Doesn't it restrict one to think in certain ways rather than what feels natural to someone? - A: Take that feeling of being caged in as feedback to adjust the process. Otherwise, the rules I subject myself to are voluntary. I give my best during the writing stage, which is 'cagey' and taking more effort, too, for the benefit of my research in the long run. - Makes sense. Thanks! I'll give another shot to zettelkasten and rewatch your talk! - Q: How does denote compare to org-roam? - A: Denote is smaller, allows finding notes, but gets out of your way otherwise. - Q:I noticed that the wikipedia link you wrote was typed wrongly - and it got me thinking about how to deal with broken links at scale? Do you have any thoughts on this? What about archival? - A: Use any script to automate fixing broken links - Q:When I completely re-worked my config some two years ago, I also tried out some of these packages for making notes in Emacs. But none of them actually fit my purpose because **I do not like the idea of splitting up my ideas**. I am writing prose, I collect material, reading lists and so on in **just one big file** everything fits in. In this notebook.org file I do archiving from time to time in a monthly basis, and I search these files in Finder on macOS to find older notes I would like to go back to. So, if I write a paper, it's basically an extract from my old notes that only have one structure, viz. when I took them. **Time structures my thought, and my notes.** But they would get lost if I split them up in a network-like structure like a wiki, or even a zettelkasten. My 2 ct. BTW, I work on legal and sociological topics. I'm a lawyer by training. - A:Cool! Happy for you :) See Twyla Tharpe. - Q:How Zettelkasten is useful for highly mathematical STEM academic fields like computer science or engineering fields? Like when studying a STEM field, what should we make notes of? The important bits are interconnected in a heirarchy, usually chapters of a book (1 -> 2 -> 3). Main points are usually dense, highly context-dependent sentences. One feels like he is copying information to another box. It's usually not possible to reword scietific results in ones own words. - A: (probably by oliver epper!! )Zettelkasten is great for Mathematics and incredible for CS. With org-babel you can have living source code that you can execute from the note. (Zettelkasten using denote, using org is the link here). You can even use Agda if you want to have living proofs in your note. Even inline LaTeX is an option for beautiful commutative diagrams or math terms. Quote the sentence as is and add ...? - A: foundational knowledge is important for tests mostly; and eventually becomes your inventory of skills (you can do X proofs from the top of your head).   Copy box: fridge me - see appendix A below: local link in supply chain of knowledge - engagement doing the work of not copying, but rephrasing, organizing, but sometimes also retyping alone - Q: In your experience, would you say that you re-use most of your notes? Watching your demo, I though that more notes your create, less you might re-use them... Thanks for sharing! - A: No, that'd be impossible. I have 11k notes. "Most" would be 50%, 5500 of them. I can't use that many things most of the time, it's impossible. Focuses shift, and I go from one department to another, metaphorically, as the hours, days, weeks pass. - 2:09 PM EST Q: How are notes structured and accessed when the notes grow from 10K to 100K notes. - A: Like a fractal; self-similar structures - 2:13 PM EST Q: Not a Question but I would be very interested in your thought on this video by Westenberg :- [https://www.youtube.com/watch?v=CjSWwmg-JRM](https://www.youtube.com/watch?v=CjSWwmg-JRM) , Why I Deleted My Second Brain: A Journey Back to Real Thinking - A: dunno, probably a lot of collection, not a lot of thinking in the ZK to some purpose that worked...? Usually, posts/videos like this conflate note taking as a dumping ground for 'stuff' with something that is valuable in the long term.  - Q: Is there a danger that with a Zettlekasten-process, that the process gets a bit in the way of the content? - A: STrive for speed of thought tools, not e.g. typewriter. THEN: reduce ritual and ceremony.  - Q: How do you navigate looking at all posts with certain tags (this might be in emacs already; new to emacs ;)) - A:I don't; tags are just a way to loosely group notes (and stuff in general) so that you can find potentially relevant pieces of information more quickly. To navigate, use links. Create nativigational aids.  - Q: I thought denote uses md files - I think it can use either markdown or org. - denote is agnostic to the format - and I already use org-roam but this makes me think I may want to switch. - denote is more minimal - Denote is simpler - Org-roam feels more hackable for me - org-roam tries to implement Roam Research - I'm just used to org-roam since years - after some research I went with org-roam just beacuse it handles org files. boy if I knew that back then - I have a lot of stuff that depends on org-roam, because it does more than just the zettelkasten. It is more of a database structure. - His slides are very aesthetic. - all these speakers need to provide there emacs ui setup in emacsconf repo - it was a compliment, all of them have eye-candy emacs - How did I not know the guy who runs zettelkasten.de was an Emacs user.  (It makes total sense, but I didn't know until now.) - oh wow, is that a video editing thing or an Emacs thing? - the video-editing is really great - So meta! Loved seeing how they  turned a zettelkasten into a talk. - Very, very interesting talk! - I'm going to have to rewatch this one a couple times. There's so much good stuff here. I don't know if the Zettelkasten idea has every fully "clicked" for me, but I think this is the closest I've been to "getting it"  - (add-hook 'org-mode-hook #'visual-line-mode) - oh yeah I have started to download the webpages I refer to - I use wget manually though. - I have tried zettelkasten through org-roam before. it felt too overwhelming, so I just do "bunch of org files in a directory" now - I think everyone has to find their own style. - org-roam can feel confusing in the beginning, I do get that - I feel like it is okay to just do what you feel suits you and slowly improve your flow - I am very addicted to it at this point, but I understand this - it doesn't have to use the hottest thing in the market - I don't do second brain thing now, I just write whenever I want to - I use org capture to maintain a journal and separate org files later. - I always start with writing and link things after I have a first draft of a file - I can confirm that 2k notes need to be very well organized to not get lost. Once you get to the point where your notes grow too fast, you really need a very good structure - it is an org file? - it looks like an org file. He just doesn't use headings that much. - I'm going to have to rewatch this one a couple times. There's so much good stuff here. I don't know if the Zettelkasten idea has every fully "clicked" for me, but I think this is the closest I've been to "getting it" 🙂 - Excellent talk (slides and presentation itself). 👏 - agreed, it's going to require several listens! - easily one of the best talks during emacsconf - Thanks for the talk! - lol, 'so is wearing underwear' - Amazing parallelisms - "so is brushing your teeth everyday" - Q: does christian make videos too - I have seen them somewhere - the point of zettelkasten is to see varying differences between various notes and make interesting connections. so the only 'cage' is to just write notes, the creativity will happen when you see the interesting connections. - as luhmann put it: "without noticing differences, one cannot think" - so far this talk has been very good - off topic, but I really dig there overall room aesthetics - https://github.com/yibie/org-supertag - it's by the emacs-china guy - though I don't like the ai integration in there Appendix A: # 202402121625 Zettelkasten can be the fridge-like buffer of knowledge #zettelkasten  Any local knowledge database serves as a **buffer** between all available information sources on the internet and actual problems that have been solved. > [T]here's no "local link" in this supply chain that we've developed. Google is the closest link, meaning we use the massive, unsorted network that is the Internet and Google's interpretation of our problem as our "second brain".[#20240212ds][] A Zettelkasten, as a trusted system[[201304061037]] for information retrieval, becomes the first line of defense when looking for a solution:     Problem → Zettelkasten → Google As Aseem Thakar points out, we don't go foraging in the woods whenever we get hungry, but instead go to the fridge in our apartment, then head to the supermarket if we don't find anything there, then maybe check out farms if the market is empty.[#20240212ds][] Defaulting to web search for a solution and never building up a local storage buffer of answers to our problems would be similar. [#20240212ds]: Aseem Thakar: "How to build a second brain as a software developer", 2021-09-26, <[https://aseemthakar.com/how-to-build-a-second-brain-as-a-software-developer/](https://aseemthakar.com/how-to-build-a-second-brain-as-a-software-developer/)> [[!inline pages="internal(2025/info/zettelkasten-after)" raw="yes"]] [[!inline pages="internal(2025/info/zettelkasten-nav)" raw="yes"]]