I want to be able to use grep to find matching lines and to be able to jump through them using
previous-error however I don't feel the need to have the match list on screen and it takes up considerable space. I would like to find a way to get similar functionality without having to have the window visible.
I managed to avoid showing the window using
(setq-default display-buffer-alist '(("\\*grep\\*" (display-buffer-no-window)))) however when the buffer is not in a visible window I get an error when using
Debugger entered--Lisp error: (wrong-type-argument window-live-p nil) #<subr select-window>(nil nil) ad-Advice-select-window(#<subr select-window> nil) apply(ad-Advice-select-window #<subr select-window> nil) select-window(nil) rustc-scroll-down-after-next-error() run-hooks(next-error-hook) next-error-found(#<buffer *grep*> #<buffer controller.rs>) next-error(nil) funcall-interactively(next-error nil) call-interactively(next-error nil nil) command-execute(next-error)
Manually making the window visible then running
next-error works, so it isn't broken but something assumes the window is visible for some reason.