I'm thinking of two specific examples, but I'm sure there are more. Currently when I do a rg, and select one of the files, it is opened in a new window in my current frame. Likewise if I am following code in gdb and I step into a new file -- a new window is created in the frame for the new buffer. Eventually I have way too many, way too small windows and have to manually close them.
Let's say I have 2 windows open
|--------------|------------| | 1 | 2 | |---------------------------- If I have gdb or rg in window one and click/step I'd like the buffer opened in window 2.
How can I tell emacs to just reuse an existing window if one exists?
display-buffer-alist,display-buffer-fallback-action, or any other variable that might influencedisplay-buffer. (SeeC-h f display-buffer RET.)emacs -q? If yes, can you reproduce it withemacs -Q?