I would like to prevent ESS from changing my window configuration but when ESS tracebug is active, entering debugging changes the window configuration.
Suppose three windows in the emacs frame: (1) an R file that defines a function; (2) an R script that calls the function defined in (1); (3): the inferior R ess process. If from (2) I send code to the R interpreter, by default (2) gets replaced by (1) (showing the line to be evaluated, etc). The window showing (3) is left where it originally was; so we actually have the buffer that was in (1) shown twice (at 2 and at 1).
This happens to me under this configuration (starting emacs as emacs -Q
)
(package-initialize)
(use-package ess)
I have an additional configuration (all in the spirit of "do not disrupt my window configuration: I'll tell you in what window to start by issuing M-x R
there"):
(setq display-buffer-alist
'(("*R" . (display-buffer-same-window)))
)
With this configuration, under debug, window (2) now displays the R session (i.e., the inferior R buffer is shown at the original window location 3, and now at 2 also).
The screenshots below show this issue. The first screenshot with the three windows as described (1, 2, 3, from top to bottom).
The second screenshot (using the configuration of display-buffer-same-window
) immediately after evaluating the function into R (C-c C-f
), and then, from (2), evaluating the line (C-c C-n
).
If I disable tracebug, M-x ess-tracebug
, no window changes take place, but I do not want to disable following the execution on the window (window 1) that has the code. I would like to use tracebug but avoid any change to my window configuration: just show (1) with the debugging stuff, but leave (2) alone. How can I do that?