* python.el window management
@ 2024-03-29 17:04 Samuel Sinayoko
0 siblings, 0 replies; only message in thread
From: Samuel Sinayoko @ 2024-03-29 17:04 UTC (permalink / raw)
To: help-gnu-emacs
Hi all, I
'm running into the following issue with python windows in emacs 29.1 on
OSX. Buffers end up being duplicated in certain conditions. I've started
emacs using "emacs -Q" so this is all using the default settings.
- I like to have my *Python* shell buffer under my python code buffer
(figure 1)
+--------------------------------------------------------------+
| |
| |
| helloworld.py source buffer |
| |
| |
<--------------------------------------------------------------+
| |
| |
| *Python* Shell Buffer |
| |
| |
| |
+--------------------------------------------------------------+
Figure 1. Initial setup with Python source code buffer above *Python*
shell buffer.
- When executing the source buffer with C-c C-c the source buffer ends up
being duplicated on the bottom right (see figure 2)
+--------------------------------------------------------------+
| |
| |
| helloworld.py source buffer |
| |
| |
<-----------------------------+--------------------------------+
| | |
| | |
| *Python* shell buffer | helloworld.py source buffer |
| | |
| | |
| | |
+-----------------------------+--------------------------------+
Figure 2. Code buffer duplicated on bottom right after running C-c C-c
- Also if I then move to the *Python* shell buffer and press <enter>, the
Python shell buffer ends up being duplicated on the top right (see figure 3)
+-----------------------------+--------------------------------+
| | |
| | |
| helloworld.py source buffer | *Python* shell buffer |
| | |
| | |
<-----------------------------+--------------------------------+
| | |
| | |
| *Python* shell buffer | helloworld.py source buffer |
| | |
| | |
| | |
+-----------------------------+--------------------------------+
Figure 3. *Python* shell buffer is duplicated on top right when pressing
<enter> in bottom left window
Obviously this isn't what I'd expect, I'd like to keep the initial layout
(figure 1).
I came across this helpful guide on managing windows
https://www.masteringemacs.org/article/demystifying-emacs-window-manager#templates-examples
and tried customising the display-buffer-alist variable using
(add-to-list 'display-buffer-alist
'((or (derived-mode . python-mode) (derived-mode . inferior-python-mode))
(display-buffer-reuse-window display-buffer-reuse-mode-window)
(inhibit-same-window . nil)))
but that's making no difference here, I get the same behaviour as before
(figures 2 and 3).
I've got a couple of questions.
1. Are others able to reproduce this issue?
2. Is there a way to configure display-buffer-alist to avoid seeing my
python source and shell buffers duplicated and get figure 1 instead of 2 or
3?
Grateful for any tips!
Many thanks!
Sam
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-29 17:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 17:04 python.el window management Samuel Sinayoko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).