Bookmarks, Eshell, and Docker

Fuco1 is really good at investigating how Emacs’ systems work and extending them to better suit his workflow. The latest example of this—or at least the latest that I know of—is his work in extending the Emacs bookmark system. The particular problem he is trying to solve is bookmarking Eshell sessions in Docker containers. That’s pretty interesting if you do a lot of work with Docker and you can check Fuco1’s post for the details.

More interesting to me, however, is how flexible the bookmark system is. You can bookmark whatever you want by providing a couple of functions. One of the functions builds an alist containing all the information needed to rebuild the buffer you want to bookmark. The other function uses this alist to rebuild the buffer when the bookmark is opened. Again, you should see Fuco1’s post for the details.

If you’re like me, you probably never thought much about the implementation of bookmarks, but as usual with Emacs, it’s well thought out and very extensible. If you have some special type of buffer you’d like to bookmark, it turns out to be pretty easy to do. Fuco1’s post is worth reading just to see the details of how the bookmark system works. It’s definitely worth a read even if you don’t have an immediate need to make a new bookmark type.

This entry was posted in General and tagged . Bookmark the permalink.