0

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?

4
  • What you describe is not the default behavior, Emacs will not keep splitting but reuse the window. Please make sure you have not incorrectly modified display-buffer-alist, display-buffer-fallback-action, or any other variable that might influence display-buffer. (See C-h f display-buffer RET.) Commented Sep 16, 2022 at 13:53
  • IOW, can you reproduce the behavior with emacs -q? If yes, can you reproduce it with emacs -Q? Commented Sep 16, 2022 at 14:15
  • I asked and answered the same question here: emacs.stackexchange.com/questions/69706/… Commented Sep 16, 2022 at 16:44
  • Not the same question I think: the OP here is not concerned with Org mode links at all (despite the title). Commented Sep 16, 2022 at 19:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.