Emacs Bookmarks

Baisc Operations

  • Can edit with bookmark-bmenu-list (C-x r l)
  • Then use dired-like bindings

Creating bookmarks:

C-x r m (bookmark-set) - Set a bookmark at the current location You'll be prompted to name the bookmark save with bookmarks-save

Jumping to bookmarks:

But better to just you consult-buffer

C-x r b (bookmark-jump) - Jump to a bookmark C-x r l (bookmark-bmenu-list) - List all bookmarks

Managing bookmarks:

M-x bookmark-delete - Delete a bookmark M-x bookmark-rename - Rename a bookmark

[>>] Org-Roam-Tips

Emacs bookmarks can actually save and recall much more than just files. Here's what you can bookmark:

File locations - The most common use, marking a specific position in a file Dired buffers - Bookmark directory listings, including which files were marked and the cursor position Info nodes - Bookmark specific nodes in Info documentation GNUS buffers - Bookmark locations in news articles and mailboxes Web pages - Using packages like EWW, you can bookmark web pages Remote locations - Bookmarks work with TRAMP for remote files and directories Non-file buffers - You can bookmark shell buffers, compilation buffers, etc. Org mode locations - Special integration with Org mode headings Custom bookmark types - Packages can define their own bookmark types

For example, you could:

Bookmark a specific mail message in a mail reader Bookmark a shell command's output Bookmark a specific search result Bookmark a man page Bookmark a specific heading in a document

Under the hood, Emacs bookmarks are quite flexible - they can store arbitrary Lisp data and have custom handlers for jumping to the bookmarked location. This is why they can work with virtually any type of Emacs buffer, not just files.