30 May 2025

Managing Bookmarks the Emacs Way: Why I Built ESB

The Problem with Browser Bookmarks

If you are reading this, maybe you spend most of your day inside Emacs. You probably already use it for emails, RSS, file stuff, even browsing web pages. But then, why bookmarks are still stuck inside Firefox or Chrome?

Bookmarks in browser just feel annoying when everything else is in Emacs. Like, you find a nice link while working in Emacs, but now you need to switch to browser just to save it. Not only that, your bookmarks are locked to some sync system from Google or Mozilla or someone else.

But for us who like to own our data and keep things inside Emacs, I think there is a better way.

Enter ESB: Emacs Simple Bookmark

So I made ESB. It's a small and simple bookmark manager that works inside Emacs. It also encrypts bookmarks, and you can sync them in any way you want.

Idea is very basic: bookmarks are your data, so they should stay in your system, not in someone else’s cloud. Want to sync with GitHub? Go ahead. Self-hosted GitLab? Sure. Your own server? Even better.

Technical Implementation

Bookmarks are saved in JSON file. Each one has URL, maybe description, and some tags. The cool part is the storage backend. By default it uses GPG to encrypt before saving:

(defcustom esb-storage-backend 'gpg
  "Storage backend for bookmarks."
  :type '(choice (const :tag "GPG encrypted" gpg)
                 (const :tag "Plain text" plain)
                 (function :tag "Custom backend"))
  :group 'esb)

Because of GPG, you can put the bookmark file on public GitHub repo and it's still safe. I do this for my dotfiles. Also, ESB loads bookmarks in memory, so it feels fast. It only writes to file when you change something.

You can use prefix args to filter by tag. This helps a lot when you have many bookmarks and want to find one doc or article you saved long time ago.

Why This Approach Makes Sense For Me

The nice thing about keeping bookmarks in Emacs is not only workflow. It’s also about owning your stuff and making it flexible. You can grep them, version control them, backup with dotfiles, or write scripts to do whatever you want.

Also, you're free from browser companies. Change browser? Bookmarks are still there. Change OS? Still there. Want to move to different system later? It's JSON, so export is easy.

And if you sync with Git, you get history. Deleted bookmarks by mistake? git revert. Want to check what links you saved last year? git log can show.

The Limitations

But, let’s be honest. This setup is not for everyone. You need to set up GPG, Git repo, and remember to commit. If you just want bookmarks to work and don’t want to think too much, the browser way is easier.

Also, ESB is only in Emacs. If you browse a lot outside Emacs, it’s not so nice. You can still look at the file, but not use the Emacs functions.

GPG can also be tricky, especially when you use many computers with different configs. I try to explain this in the README, but it’s still harder than clicking “sync” in browser, of course.

Should You Use It?

If you live inside Emacs and care more about control than convenience, I think ESB is good for you. If you keep dotfiles in Git, run your own stuff, and like tools that play nice together, maybe try it.

But if you just want bookmarks that sync and you don’t want to worry about how, then browser is better. That’s fine too, not everyone needs the same thing.

If you’re curious, the code is on GitHub, AGPL license. PRs, issues, or just feedback are all welcome. It works fine for me, but I want to see how others use it too.

GitHub link: https://github.com/0xhenrique/esb

Tags: emacs esb projects
My RSS Feed
Created using GNU Emacs + Org Static Blog.