An occur buffer is just a buffer in read-only mode, that doesn't mean that it cannot be manipulated. Something as straightforward like this can help you: ``` lisp (defun occur-kill-line() "Quick and dirty discard line from occur resultset. from https://emacs.stackexchange.com/a/52865/13589" (interactive) (let ((inhibit-read-only t)) (kill-whole-line) (delete-blank-lines))) ``` invoking this function will kill the current line in occur buffer. Pressing `g` will revert the buffer. Adding this: ``` lisp (define-key occur-mode-map (kbd "k") 'occur-kill-line) ``` will bind `k` to `occur-kill-line` to `occur-mode-map` making it available as occur command just pressing `k`.