Function: proced-omit-processes
proced-omit-processes is an interactive and byte-compiled function
defined in proced.el.gz.
Signature
(proced-omit-processes &optional ARG QUIET)
Documentation
Omit marked processes.
With prefix ARG, omit that many lines starting with the current line.
(A negative argument omits backward.)
If transient-mark-mode(var)/transient-mark-mode(fun) is turned on and the region is active,
omit the processes in region.
If QUIET is non-nil suppress status message.
Returns count of omitted lines.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/proced.el.gz
;; Mostly analog of `dired-do-kill-lines'.
;; However, for negative args the target lines of `dired-do-kill-lines'
;; include the current line, whereas `dired-mark' for negative args operates
;; on the preceding lines. Here we are consistent with `dired-mark'.
(defun proced-omit-processes (&optional arg quiet)
"Omit marked processes.
With prefix ARG, omit that many lines starting with the current line.
\(A negative argument omits backward.)
If `transient-mark-mode' is turned on and the region is active,
omit the processes in region.
If QUIET is non-nil suppress status message.
Returns count of omitted lines."
(interactive "P" proced-mode)
(let ((mark-re (proced-marker-regexp))
(count 0)
buffer-read-only)
(cond ((use-region-p) ;; Omit active region
(let ((lines (count-lines (region-beginning) (region-end))))
(save-excursion
(goto-char (region-beginning))
(while (< count lines)
(proced-omit-process)
(setq count (1+ count))))))
((not arg) ;; Omit marked lines
(save-excursion
(goto-char (point-min))
(while (and (not (eobp))
(re-search-forward mark-re nil t))
(proced-omit-process)
(setq count (1+ count)))))
((< 0 arg) ;; Omit forward
(while (and (not (eobp)) (< count arg))
(proced-omit-process)
(setq count (1+ count))))
((< arg 0) ;; Omit backward
(while (and (not (bobp)) (< count (- arg)))
(forward-line -1)
(proced-omit-process)
(setq count (1+ count)))))
(unless (zerop count) (proced-move-to-goal-column))
(unless quiet (proced-success-message "Omitted" count))
count))