Zettelkasten Forum

phi-notes emacs package

edited December 2021 in Software & Gadgets

Dear friends,

I'm releasing phi-notes, an emacs package implementing a minor mode to work with a flavour of the Zettelkasten system I've been using for some years now. It has the following characteristics:

  • Notes are identified by unique, sequential numbers (0001, 0002 etc.).
  • Notes may be linked using the wikilink syntax ([[0001]]).
  • Notes may have "parent" and "descendant" notes; they may also be linked to project notes.
  • Bibliographical annotation is supported with BibTeX references.
  • Notes may have tags (identified by #hashtags).
  • Notes have a YAML(ish) frontmatter to keep metadata and are (preferably, but not necessarily) written in Markdown.

The aim of this project is to develop features to ease the creation, navigation and linking of notes in one or multiple note repositories.

A sidebar functionality makes the minor-mode particularly useful for working with structure notes:

Other functionalities include: creating descendant notes, integration with helm, helm-ag and helm-bibtex; "killing" and "yanking" to notes, searching for tags and backlinks; navigation commands for visiting the parent, following links.

Some details of the implementation might be too personal, but the code may at least be useful as a starting point. I'm calling it a phi minor mode because this is how I named my system long ago.

More information and a setup guide are available on the GitHub project documentation.

Merry Christmas! 🎄

Post edited by brunoc on


  • Thanks for sharing the update and release! Will have another look!

    I notice you're on note 7023 in the GIF already. Will your code scale to 5 digits? :)

    Author at Zettelkasten.de • https://christiantietze.de/

  • edited December 2021

    @ctietze said:
    Thanks for sharing the update and release! Will have another look!

    I notice you're on note 7023 in the GIF already. Will your code scale to 5 digits? :)

    Because now it's so easy to create different repositories with M-x phi-add-repository (per your suggestion of providing a user-friendly setup), I did a test and everything seems to work fine after the counter turned from 9999 to 10000!

    For my personal notes, I'm now working with two repositories, one for academic research and another for business/tech/etc. Even though the two archives are compartmentalised, I decided to start this second series (the "alpha" notes) with the number 7000, while the original "phi" series is currently at note number 2155.

    It seems this strategy is gonna work because it is so easy to switch repositories (or simply visit one or another recent file in the history). And each repository has a very different behaviour – "alpha" tends to grow much faster in the number of notes.

  • @ctieze you may be pleased to know that I've updated the code to work with timestamp IDs (202112241152...).

  • edited January 8

    @Sukhovskii said:
    I am sure you've seen this, but nonetheless:

    Thank you for the reference! I didn't pay attention to this article nor did I notice it included an emacs implementation.

    The article mentions that Luhmann kept bibliographical notes apart from his ZK system proper. That is interesting. I had them separated in the past (using OmniOutliner for quite some time), but made a move at the end of my PhD to keep everything together. Still, the ability to separate those annotations from "idea notes" (Umberto Eco's terminology), e. g. using filters, is possibly something desirable which I have never implemented (but maybe I could do it soon).

    I don't see any value, though, in reproducing Luhmann's hierarchical notation for the note IDs.

  • edited January 8

    Anyways, I should add that somewhere Luhmann comments that his system evolved more and more in the direction of keeping longer notes, more articulated with concrete writing projects.

    This is something I've been recently doing more systematically: working with long, messy notes, and then creating some structure, always aiming for a potentially publishable paper. That was also a reason for programming the "yank to note" and "kill to note" functions included in the emacs package.

Sign In or Register to comment.