Function: bookmark-bmenu-mode

bookmark-bmenu-mode is an interactive and byte-compiled function defined in bookmark.el.gz.

Signature

(bookmark-bmenu-mode)

Documentation

Major mode for editing a list of bookmarks.

Each line describes one of the bookmarks in Emacs. Letters do not insert themselves; instead, they are commands. Bookmark names preceded by a "*" have annotations.

If bookmark-sort-flag is non-nil, then sort the list by bookmark name (case-insensitively, in collation order); the direction of that sort can be reversed by using the column sort toggle for the bookmark name column.

If bookmark-sort-flag is nil, then sort the list by bookmark creation order, with most recently created bookmarks on top. However, the column sort toggle will still activate (and thereafter toggle the direction of) lexical sorting by bookmark name. At any time you may use M-x revert-buffer (revert-buffer) to go back to sorting by creation order.

m (bookmark-bmenu-mark) -- mark bookmark to be displayed. M (bookmark-bmenu-mark-all) -- mark all listed bookmarks to be displayed. v (bookmark-bmenu-select) -- select bookmark of line point is on.
  Also show bookmarks marked using m in other windows.
t (bookmark-bmenu-toggle-filenames) -- toggle displaying of filenames (they may obscure long bookmark names). w (bookmark-bmenu-locate) -- display (in minibuffer) location of this bookmark.
1 (bookmark-bmenu-1-window) -- select this bookmark in full-frame window.
2 (bookmark-bmenu-2-window) -- select this bookmark in one window,
  together with bookmark selected before this one in another window.
RET (bookmark-bmenu-this-window) -- select this bookmark in place of the bookmark menu buffer. o (bookmark-bmenu-other-window) -- select this bookmark in another window,
  so the bookmark menu bookmark remains visible in its window.
5 (bookmark-bmenu-other-frame) -- select this bookmark in another frame.
C-o (bookmark-bmenu-switch-other-window) -- switch the other window to this bookmark. r (bookmark-bmenu-rename) -- rename this bookmark (prompts for new name). R (bookmark-bmenu-relocate) -- relocate this bookmark's file (prompts for new file). d (bookmark-bmenu-delete) -- mark this bookmark to be deleted, and move down. C-d (bookmark-bmenu-delete-backwards) -- mark this bookmark to be deleted, and move up. D (bookmark-bmenu-delete-all) -- mark all listed bookmarks as to be deleted. x (bookmark-bmenu-execute-deletions) -- delete bookmarks marked with d (bookmark-bmenu-delete) or D (bookmark-bmenu-delete-all). s (bookmark-bmenu-save) -- save the current bookmark list in the default file.
  With a prefix arg, prompts for a file to save in.
l (bookmark-bmenu-load) -- load in a file of bookmarks (prompts for file.) u (bookmark-bmenu-unmark) -- remove all kinds of marks from current line.
  With prefix argument, also move up one line.
DEL (bookmark-bmenu-backup-unmark) -- back up a line and remove marks. U (bookmark-bmenu-unmark-all) -- remove all kinds of marks from all listed bookmarks. a (bookmark-bmenu-show-annotation) -- show the annotation, if it exists, for the current bookmark
  in another buffer.
A (bookmark-bmenu-show-all-annotations) -- show the annotations of all bookmarks in another buffer. e (bookmark-bmenu-edit-annotation) -- edit the annotation for the current bookmark.
/ (bookmark-bmenu-search) -- incrementally search for bookmarks.
g (revert-buffer) -- refresh the buffer, and thus refresh the sort order (useful
  if bookmark-sort-flag is nil).

In addition to any hooks its parent mode tabulated-list-mode might have run, this mode runs the hook bookmark-bmenu-mode-hook, as the final or penultimate step during initialization.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/bookmark.el.gz
(define-derived-mode bookmark-bmenu-mode tabulated-list-mode "Bookmark Menu"
  "Major mode for editing a list of bookmarks.
Each line describes one of the bookmarks in Emacs.
Letters do not insert themselves; instead, they are commands.
Bookmark names preceded by a \"*\" have annotations.

If `bookmark-sort-flag' is non-nil, then sort the list by
bookmark name (case-insensitively, in collation order); the
direction of that sort can be reversed by using the column sort
toggle for the bookmark name column.

If `bookmark-sort-flag' is nil, then sort the list by bookmark
creation order, with most recently created bookmarks on top.
However, the column sort toggle will still activate (and
thereafter toggle the direction of) lexical sorting by bookmark name.
At any time you may use \\[revert-buffer] to go back to sorting by creation order.

\\<bookmark-bmenu-mode-map>
\\[bookmark-bmenu-mark] -- mark bookmark to be displayed.
\\[bookmark-bmenu-mark-all] -- mark all listed bookmarks to be displayed.
\\[bookmark-bmenu-select] -- select bookmark of line point is on.
  Also show bookmarks marked using m in other windows.
\\[bookmark-bmenu-toggle-filenames] -- toggle displaying of filenames (they may obscure long bookmark names).
\\[bookmark-bmenu-locate] -- display (in minibuffer) location of this bookmark.
\\[bookmark-bmenu-1-window] -- select this bookmark in full-frame window.
\\[bookmark-bmenu-2-window] -- select this bookmark in one window,
  together with bookmark selected before this one in another window.
\\[bookmark-bmenu-this-window] -- select this bookmark in place of the bookmark menu buffer.
\\[bookmark-bmenu-other-window] -- select this bookmark in another window,
  so the bookmark menu bookmark remains visible in its window.
\\[bookmark-bmenu-other-frame] -- select this bookmark in another frame.
\\[bookmark-bmenu-switch-other-window] -- switch the other window to this bookmark.
\\[bookmark-bmenu-rename] -- rename this bookmark (prompts for new name).
\\[bookmark-bmenu-relocate] -- relocate this bookmark's file (prompts for new file).
\\[bookmark-bmenu-delete] -- mark this bookmark to be deleted, and move down.
\\[bookmark-bmenu-delete-backwards] -- mark this bookmark to be deleted, and move up.
\\[bookmark-bmenu-delete-all] -- mark all listed bookmarks as to be deleted.
\\[bookmark-bmenu-execute-deletions] -- delete bookmarks marked with `\\[bookmark-bmenu-delete]' or `\\[bookmark-bmenu-delete-all]'.
\\[bookmark-bmenu-save] -- save the current bookmark list in the default file.
  With a prefix arg, prompts for a file to save in.
\\[bookmark-bmenu-load] -- load in a file of bookmarks (prompts for file.)
\\[bookmark-bmenu-unmark] -- remove all kinds of marks from current line.
  With prefix argument, also move up one line.
\\[bookmark-bmenu-backup-unmark] -- back up a line and remove marks.
\\[bookmark-bmenu-unmark-all] -- remove all kinds of marks from all listed bookmarks.
\\[bookmark-bmenu-show-annotation] -- show the annotation, if it exists, for the current bookmark
  in another buffer.
\\[bookmark-bmenu-show-all-annotations] -- show the annotations of all bookmarks in another buffer.
\\[bookmark-bmenu-edit-annotation] -- edit the annotation for the current bookmark.
\\[bookmark-bmenu-search] -- incrementally search for bookmarks.
\\[revert-buffer] -- refresh the buffer, and thus refresh the sort order (useful
  if `bookmark-sort-flag' is nil)."
  (setq truncate-lines t)
  (setq buffer-read-only t)
  ;; FIXME: The header could also display the current default bookmark file
  ;; according to `bookmark-bookmarks-timestamp'.
  (setq tabulated-list-format
        `[("" 1) ;; Space to add "*" for bookmark with annotation
          ("Bookmark Name"
           ,bookmark-bmenu-file-column bookmark-bmenu--name-predicate)
          ("Type" ,bookmark-bmenu-type-column-width bookmark-bmenu--type-predicate)
          ,@(if bookmark-bmenu-toggle-filenames
                '(("File" 0 bookmark-bmenu--file-predicate)))])
  (setq tabulated-list-padding bookmark-bmenu-marks-width)
  (when (and bookmark-sort-flag
             (not (eq bookmark-sort-flag 'last-modified)))
    (setq tabulated-list-sort-key '("Bookmark Name" . nil)))
  (add-hook 'tabulated-list-revert-hook #'bookmark-bmenu--revert nil t)'
  (setq revert-buffer-function 'bookmark-bmenu--revert)
  (tabulated-list-init-header))