Function: occur-mode

occur-mode is an interactive and byte-compiled function defined in replace.el.gz.

Signature

(occur-mode)

Documentation

Major mode for output from M-s o (occur).

Move point to one of the items in this buffer, then use RET (occur-mode-goto-occurrence) to go to the occurrence that the item refers to. Alternatively, click <mouse-2> (occur-mode-mouse-goto) on an item to go to it.

<mouse-2> occur-mode-mouse-goto
C-c C-c occur-mode-goto-occurrence
C-c C-f next-error-follow-minor-mode(var)/next-error-follow-minor-mode(fun)
C-o occur-mode-display-occurrence
M-n occur-next
M-p occur-prev
RET occur-mode-goto-occurrence
c clone-buffer
e occur-edit-mode
l recenter-current-error
n next-error-no-select
o occur-mode-goto-occurrence-other-window
p previous-error-no-select
r occur-rename-buffer

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

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/replace.el.gz
(define-derived-mode occur-mode special-mode "Occur"
  "Major mode for output from \\[occur].
\\<occur-mode-map>Move point to one of the items in this buffer, then use
\\[occur-mode-goto-occurrence] to go to the occurrence that the item refers to.
Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it.

\\{occur-mode-map}"
  (setq-local revert-buffer-function #'occur-revert-function)
  (add-hook 'kill-buffer-hook #'occur--garbage-collect-revert-args nil t)
  (setq next-error-function #'occur-next-error))