{"id":13862885,"url":"https://github.com/joodland/bm","last_synced_at":"2025-07-14T13:32:47.840Z","repository":{"id":1370612,"uuid":"1321993","full_name":"joodland/bm","owner":"joodland","description":"bm.el -- Visual Bookmarks for GNU Emacs","archived":false,"fork":false,"pushed_at":"2023-10-08T20:05:46.000Z","size":524,"stargazers_count":264,"open_issues_count":9,"forks_count":30,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-05T06:06:24.425Z","etag":null,"topics":["bookmark","emacs","fringe","gnu-emacs","melpa","visual-bookmarks"],"latest_commit_sha":null,"homepage":"http://joodland.github.io/bm/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joodland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-02-02T21:39:11.000Z","updated_at":"2024-07-29T07:02:34.000Z","dependencies_parsed_at":"2023-09-28T22:55:50.061Z","dependency_job_id":null,"html_url":"https://github.com/joodland/bm","commit_stats":{"total_commits":95,"total_committers":13,"mean_commits":"7.3076923076923075","dds":0.6631578947368422,"last_synced_commit":"9a31c61f44e6f1033ca43bd7f3eb33ffdb2ca595"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joodland%2Fbm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joodland%2Fbm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joodland%2Fbm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joodland%2Fbm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joodland","download_url":"https://codeload.github.com/joodland/bm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225980898,"owners_count":17554919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bookmark","emacs","fringe","gnu-emacs","melpa","visual-bookmarks"],"created_at":"2024-08-05T06:01:54.971Z","updated_at":"2025-07-14T13:32:47.826Z","avatar_url":"https://github.com/joodland.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"[![MELPA](http://melpa.org/packages/bm-badge.svg)](http://melpa.org/#/bm)\n[![MELPA](http://stable.melpa.org/packages/bm-badge.svg)](http://melpa.org/#/bm)\n[![CI](https://github.com/joodland/bm/actions/workflows/test.yml/badge.svg)](https://github.com/joodland/bm/actions/workflows/test.yml)\n\n\nVisible bookmarks in buffer for GNU Emacs 28.x, 29.x, 30.x\n=====================\n\nThis package provides visible, buffer local, bookmarks and the ability\nto jump forward and backward to the next bookmark.\n\nIt was created because I missed the bookmarks from M$ Visual Studio in\nGNU Emacs. I think they provide an easy way to navigate in a buffer.\n\n\nFeatures:\n---------\n* Auto remove bookmark after jump to it by `bm-next` or `bm-previous`:\n* Cycle through bookmarks in all open buffers in LIFO order\n* Toggle bookmarks. Jump to next/previous bookmark.\n* Setting bookmarks based on a regexp. (Useful when searching logfiles.)\n* Mouse navigation.\n* Annotate bookmarks.\n* Different wrapping modes.\n* Different bookmarks styles, line-only, fringe-only or both.\n* Persistent bookmarks (buffer local), also in non-file buffers (*info*) and indirect buffers.\n* List bookmarks (in all buffers) in a separate buffer.\n* Cycle through bookmarks in all open buffers.\n\n\nKnown Limitations:\n------------------\n\nThere are some incompatibilities with lazy-lock when using\nfill-paragraph. All bookmark below the paragraph being filled will be\nlost. This issue can be resolved using the `jit-lock-mode'.\n\n\nInstallation:\n-------------\n\nTo use bm.el, put it in your load-path and add the following to your .emacs\n```emacs-lisp\n(require 'bm)\n```\nor\n\n```emacs-lisp\n(autoload 'bm-toggle   \"bm\" \"Toggle bookmark in current buffer.\" t)\n(autoload 'bm-next     \"bm\" \"Goto bookmark.\"                     t)\n(autoload 'bm-previous \"bm\" \"Goto previous bookmark.\"            t)\n```\n\nConfiguration:\n--------------\n\nTo make it easier to use, assign the commands to some keys.\n\nM$ Visual Studio key setup.\n```emacs-lisp\n(global-set-key (kbd \"\u003cC-f2\u003e\") 'bm-toggle)\n(global-set-key (kbd \"\u003cf2\u003e\")   'bm-next)\n(global-set-key (kbd \"\u003cS-f2\u003e\") 'bm-previous)\n```\nClick on fringe to toggle bookmarks, and use mouse wheel to move between them.\n```emacs-lisp\n(global-set-key (kbd \"\u003cleft-fringe\u003e \u003cmouse-5\u003e\") 'bm-next-mouse)\n(global-set-key (kbd \"\u003cleft-fringe\u003e \u003cmouse-4\u003e\") 'bm-previous-mouse)\n(global-set-key (kbd \"\u003cleft-fringe\u003e \u003cmouse-1\u003e\") 'bm-toggle-mouse)\n```\nIf you would like the markers on the right fringe instead of the left, add the following line:\n```emacs-lisp\n(setq bm-highlight-style 'bm-highlight-line-and-fringe)\n(setq bm-marker 'bm-marker-right)\n```\nIf you would like to cycle bookmark in LIFO order, add the following line:\n```emacs-lisp\n(setq bm-in-lifo-order t)\n```\nIf you would like to cycle through bookmarks in *all* open buffers, add the following line:\n```emacs-lisp\n(setq bm-cycle-all-buffers t)\n```\nIf you would like to remove bookmark after jump to it by `bm-next` or `bm-previous`:\n```emacs-lisp\n(setq temporary-bookmark-p t)\n```\nor if you want use this feature in your library:\n```emacs-lisp\n(bm-bookmark-add nil nil t)\n```\nIf you need org-mode to expand the region containing a bookmark, add the following:\n```emacs-lisp\n(add-hook 'bm-after-goto-hook 'org-bookmark-jump-unhide)\n```\n\n\nConfiguring bm.el with use-package:\n---------------------------------\nConfiguring bm.el with [use-package](https://github.com/jwiegley/use-package)\n```emacs-lisp\n(use-package bm\n         :ensure t\n         :demand t\n\n         :init\n         ;; restore on load (even before you require bm)\n         (setq bm-restore-repository-on-load t)\n\n\n         :config\n         ;; Allow cross-buffer 'next'\n         (setq bm-cycle-all-buffers t)\n\n         ;; where to store persistant files\n         (setq bm-repository-file \"~/.emacs.d/bm-repository\")\n\n         ;; save bookmarks\n         (setq-default bm-buffer-persistence t)\n\n         ;; Loading the repository from file when on start up.\n         (add-hook 'after-init-hook 'bm-repository-load)\n\n         ;; Saving bookmarks\n         (add-hook 'kill-buffer-hook #'bm-buffer-save)\n\n         ;; Saving the repository to file when on exit.\n         ;; kill-buffer-hook is not called when Emacs is killed, so we\n         ;; must save all bookmarks first.\n         (add-hook 'kill-emacs-hook #'(lambda nil\n                                          (bm-buffer-save-all)\n                                          (bm-repository-save)))\n\n         ;; The `after-save-hook' is not necessary to use to achieve persistence,\n         ;; but it makes the bookmark data in repository more in sync with the file\n         ;; state.\n         (add-hook 'after-save-hook #'bm-buffer-save)\n\n         ;; Restoring bookmarks\n         (add-hook 'find-file-hooks   #'bm-buffer-restore)\n         (add-hook 'after-revert-hook #'bm-buffer-restore)\n\n         ;; The `after-revert-hook' is not necessary to use to achieve persistence,\n         ;; but it makes the bookmark data in repository more in sync with the file\n         ;; state. This hook might cause trouble when using packages\n         ;; that automatically reverts the buffer (like vc after a check-in).\n         ;; This can easily be avoided if the package provides a hook that is\n         ;; called before the buffer is reverted (like `vc-before-checkin-hook').\n         ;; Then new bookmarks can be saved before the buffer is reverted.\n         ;; Make sure bookmarks is saved before check-in (and revert-buffer)\n         (add-hook 'vc-before-checkin-hook #'bm-buffer-save)\n\n\n         :bind ((\"\u003cf2\u003e\" . bm-next)\n                (\"S-\u003cf2\u003e\" . bm-previous)\n                (\"C-\u003cf2\u003e\" . bm-toggle))\n         )\n```\n\n\nReviews and comments:\n--------------------\n\n* [Lockdown Beam: bm.el](https://www.manueluberti.eu//emacs/2020/03/19/lockdown-beam-bm/)\n* [A Visual Bookmarks package for Emacs](http://emacsworld.blogspot.com/2008/09/visual-bookmarks-package-for-emacs.html)\n* [Bookmark Mania](http://www.emacsblog.org/2007/03/22/bookmark-mania/)\n* [EmacsWiki: VisibleBookmarks](http://www.emacswiki.org/cgi-bin/wiki/VisibleBookmarks)\n* [A couple of useful Emacs modes](http://codeblog.bsdninjas.co.uk/index.php?/archives/136-A-couple-of-useful-Emacs-modes.html)\n* [Part of Debian package: emacs-goodies-el](http://packages.debian.org/unstable/editors/emacs-goodies-el)\n* [A solution to the question 'How to highlight a particular line in emacs?' on StackOverflow](http://stackoverflow.com/questions/14454219/how-to-highlight-a-particular-line-in-emacs)\n* gnu.emacs.sources\n    * [Original posting of bm.el (31 Jan 2001)](http://groups.google.com/group/gnu.emacs.sources/browse_thread/thread/2ccc0ece443a81b6/d4b97c612190d0d6?fwc=1)\n    * [Posting of first version with persistence. (12 Nov 2003)](http://groups.google.com/group/gnu.emacs.sources/browse_thread/thread/8f0ec0f1eff89764/cd24c441f9bc6bef?lnk=gst#cd24c441f9bc6bef)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoodland%2Fbm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoodland%2Fbm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoodland%2Fbm/lists"}