Note-Taking App Hopping

Part I: Love with TiddlyWiki was end and I moved to Notion

Part I was written on 31st January 2021, a few days after I moved to Notion.

Before Notion (where you see this post), I was using different solutions for my homepage, blog and notebooks:

  • My homepage was based on Franklin, a static site generator (SSG) written in Julia.
  • I use the same thing to build my blog, which is actually the main reason I chose Franklin.
    • As being a SSG written in Julia, it can evaluate and render Julia codes while building the posts. This is important for me as I’m writing posts on machine learning methods with illustrative figures generated by Julia (mostly).
  • For notebook, I had a great time with TiddlyWiki (TW), an open-source wiki system with high customisation capability, for about 8 months. I self-host the JavaScript version of it. However, a few aspects made me leave from it eventually.
    • The freedom comes with a cost. I spent huge amount of time hacking with it, leading to something pleased me. However, as the system being hacked here and there, I found that it’s very tricky to upgrade any part of it.
      • For example, I used Stroll to convert TW into a roam-like system but last month when I attempted to pull some upgrades, my TW crashed. Luckily, I did have set up a backup system for TW, simply because this happened a lot when I wanted to hack for a new functionality.
    • Sharing contents is possible, but tedious.
      • I wrote myself a script to convert all my tiddlers (yes that how pages are called in TW 😀) with a tag `public` to static pages in a folder and simply use a web server to host that folder.
      • The annoying thing is that in order to sync up contents, I have to re-run the script manually. I could have wrote another script to detect file change (yes you can set up TW so that each tiddler is a file) and automatically re-run the building script. But there are some other reasons which make this proposal tricky.
    • The editing system is terrible. Although you can replace it with some other editors from the community.
      • Also, the default editing language, although being great, is not Markdown. Since I use TW, I sometimes mix up the syntaxes when I writing stuff in Markdown, e.g. in GitHub. But again, you can replace the default language with Markdown (you can basically do anything you want in TW).
    • The main language to hack/configure TW is not main-stream either. You need to learn it to do hacks.

For all of these reason, I re-visited Notion and found it has been improved quite a lot since I tried it for the first time (4 years ago?). I have to say that I underestimate it for a long time, simply because its front-end looks too friendly - how could such an interface to be also highly customisable? But it is.

I finally moved to Notion as I realised it is essentially a database system with a set of predefined, good-looking web-based views. Anyway, the only thing I gave up is the ability of evaluating Julia code and I have resolve almost all other issues via moving to Notion plus some additional steps to host it statically. Now my homepage is Notion-based, so is my blog and this post you are reading.

So far, here are a few things I like and dislike:

  • ✅ Sharing notes to others is as easy as turning on the sharing and sending the link to others.
  • ✅ The editing is enjoyable, with KaTeX support for inline and block equations.
    • ❌ The only thing I’m not happy with is that there is no global space to define macros. I have been heavily rely on the to write equations faster and nicer.
  • ✅ The database system is awesome and there are tons of templates for it.
  • ❌ There is not code highlighting for Julia! OMG!

But anyway, I’m overall happy with this pure Notion setup now. But maybe one day I’ll look for a switch again. Who knows?

Part II: Welcome to the Church of Emacs

As requested by my friend Tianshan, I finally completed this session today on 7th Feb 2022. I’ve been using Emacs for note-taking (and more) for almost a year now and I’m confident of saying I won’t be leaving it unless there is Emacs 2 😄

Let me start with why I left Notion, some of which are in the end of Part I.

  • ❌ Lack of native $\LaTeX$ support: To render math, Notion uses KaTeX, which only supports a part of the $\LaTeX$ commands. It’s a bit tricky to use the same .tex file I defined all my $\LaTeX$ commands in KaTeX. When I use TiddlyWiki, it was possible with MathJax–either manually porting them or writing a script that does the conversion. But still, this can make things inconsistent as they are not using the exact same file.
  • ❌ Offline workflow is tricky: Let’s just say that Notion essentially runs on the web.
  • ❌ Syntax highlighting for languages that are not so popular: No more comments for this sad fact that they don’t highlight Julia.
  • ❌ The editing was enjoyable but just NOT with Vim keybindings: This becomes a need when I started using Vim keybindings in all my other editors for coding. Typing experience becomes inconsistent if I can only use Vim keybindings in some places not another.

All of these can be seen as the lack of fine control of customisation, and customisation is the selling point of Emacs–you can pretty much do anything in Emacs.11 I’m not joking: I’m using mu4e to read emails in Emacs now. Emacs not only solved problems above and also does certain things better!

  • ✅ Native and unified $\LaTeX$ marcos: Emacs actually calls your local $\LaTeX$ to generate the math you write. Because of this, you can actually source the same global macro file you use to write your papers (if you have one). This works so nicely, especially since I started to be very semantic on coding $\LaTeX$.22 For example, instead of writing \mathbb{E}_{x \sim p_{\mathcal{D}}}[], I do \expectation{x \sim \pdata}{}. Check out this very nice blog on tips for $\LaTeX$ writing.
  • ✅ Offline and even plain-text: Emacs as a text editor works offline. Even better, pretty much everything you process with Emacs are plain text, which means you can actually do version control with them, say, using Git.
  • ✅ Syntax highlighting for pretty much all the languages: Even better, they will actually be rendered in the same way as your code editor (which of course is still Emacs) when being published to public.
  • ✅ Evil mode of Emacs: People refer to using Vim keybindings in Emacs as the evil mode but this is what keeps me here. Vim keybindings is still the most productive way to type IMO, and with this in Emacs, I don’t need to leave my hand from keyboard for a long time!
  • 🆕 Org mode is the best: If you like Markdown, you must like Org mode too as it’s just a better version of Markdown.
  • 🆕 Lovely publishing workflow: An Org file can be converted to most interesting formats you want: PDF, HTML and even slides. For HTML, which is the website you are currently viewing, I also have the freedom to theme it to what I like, which I actually wasted a few weekends to do so as web design is fun!
  • 🆕 Daily journal and Roam-like knowledge base: For everyday events that I think it may be useful, I use org-journal to capture them in a chronological order. For new pieces of knowledge I learn, I use org-roam to store them, which can be later viewed in a graph.
  • 🆕 An agenda view of your notes: If you put some to-dos in your notes and annotated them with deadlines, with org-agenda, you can also pull all of them (potentially from different files), into a single list view of to-dos in time order as well as a calendar view of them. I call this distributed project management as I can use a separate tracking note for each project I’m working on and still view them together.

But nothing is perfect, so isn’t Emacs.

  • ❌ Learning curve: With all the good things above being said, there is a huge learning curve for Emacs customisation. For one, because it uses Emacs Lisp, I have to re-Learn lisp to properly implement certain things to what I want. For the other, plugins don’t usually work out of the box–each plugin such as org-journal and org-roam requires some configuration to be usable.
  • ❌ (Almost) no collaborative editing: So as an old text editor, collaborative editing is not possible in Emacs. One work-around I discovered is to use ttyd to run a terminal on the web. With that, you can start an Emacs server and give users on web their own Emacs client sessions. If they are set to edit the same buffer, they can actually see each other’s edits in real-time. But this requires your collaborator to be familiar with Emacs or even Vim keybindings, which is not so common.
1

I’m not joking: I’m using mu4e to read emails in Emacs now.

2

For example, instead of writing \mathbb{E}_{x \sim p_{\mathcal{D}}}[], I do \expectation{x \sim \pdata}{}. Check out this very nice blog on tips for $\LaTeX$ writing.

Created via Emacs with Org mode | Styled by Nord | Updated on 17 Feb 2022