Function: ibuffer-update

ibuffer-update is an interactive and byte-compiled function defined in ibuffer.el.gz.

Signature

(ibuffer-update ARG &optional SILENT)

Documentation

Regenerate the list of all buffers.

Prefix arg non-nil means to toggle whether buffers that match ibuffer-maybe-show-predicates should be displayed.

If optional arg SILENT is non-nil, do not display progress messages.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/ibuffer.el.gz
(defun ibuffer-update (arg &optional silent)
  "Regenerate the list of all buffers.

Prefix arg non-nil means to toggle whether buffers that match
`ibuffer-maybe-show-predicates' should be displayed.

If optional arg SILENT is non-nil, do not display progress messages."
  (interactive "P")
  (if arg
      (setq ibuffer-display-maybe-show-predicates
	    (not ibuffer-display-maybe-show-predicates)))
  (ibuffer-forward-line 0)
  (let* ((bufs (buffer-list))
	 (blist (ibuffer-filter-buffers
		 (current-buffer)
		 (if (and
		      (cadr bufs)
		      (eq ibuffer-always-show-last-buffer
			  :nomini)
		      (minibufferp (cadr bufs)))
		     (nth 2 bufs)
		   (cadr bufs))
		 (ibuffer-current-buffers-with-marks bufs)
		 ibuffer-display-maybe-show-predicates)))
    (and (null blist)
	 (featurep 'ibuf-ext)
	 ibuffer-filtering-qualifiers
	 (message "No buffers! (note: filtering in effect)"))
    (unless silent
      (message "Updating buffer list..."))
    (ibuffer-redisplay-engine blist arg)
    (unless silent
      (message "Updating buffer list...done")))
  (if (eq ibuffer-shrink-to-minimum-size 'onewindow)
      (ibuffer-shrink-to-fit t)
    (when ibuffer-shrink-to-minimum-size
      (ibuffer-shrink-to-fit)))
  (ibuffer-forward-line 0)
  ;; I tried to update this automatically from the mode-line-process format,
  ;; but changing nil-ness of header-line-format while computing
  ;; mode-line-format is asking a bit too much it seems.  --Stef
  (unless (eq ibuffer-use-header-line 'title)
    (setq header-line-format
          (and ibuffer-use-header-line
               ibuffer-filtering-qualifiers
               ibuffer-header-line-format))))