From: Samuel Sinayoko <ss53g10@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: python.el window management
Date: Fri, 29 Mar 2024 17:04:06 +0000 [thread overview]
Message-ID: <CAFnr9K_2iSH2HS0PaW35UnhioweF7C_9_fcRmC0JCbQWyc9v1Q@mail.gmail.com> (raw)
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
reply other threads:[~2024-03-29 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFnr9K_2iSH2HS0PaW35UnhioweF7C_9_fcRmC0JCbQWyc9v1Q@mail.gmail.com \
--to=ss53g10@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).