From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Sinayoko Newsgroups: gmane.emacs.help Subject: python.el window management Date: Fri, 29 Mar 2024 17:04:06 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23135"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 30 07:03:57 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rqRoq-0005n9-Vl for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 07:03:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqRnv-0007vJ-5L; Sat, 30 Mar 2024 02:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqFeT-0000FR-4d for help-gnu-emacs@gnu.org; Fri, 29 Mar 2024 13:04:26 -0400 Original-Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqFeQ-0000lr-1J for help-gnu-emacs@gnu.org; Fri, 29 Mar 2024 13:04:24 -0400 Original-Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1dee27acf7aso15153455ad.2 for ; Fri, 29 Mar 2024 10:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711731858; x=1712336658; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=y9pc5tzUbeYZ40tPh2Z5juvlwTQmtaSLEQNlLbslZ5Q=; b=EKc6tfBXONrtmYpDjfih7La2b2BEHwAoCQyEBOgv+PR9t/gsnCl9wb1vYZ7zGEqHqX rR09z4DaS92UiCS+95lkwWLss+OOCtn6Xt3YoiOxSQSUqVNZUrzZb0A9NnXKIBEdgfBq ypNB30fDRhpzt97DOMCPD+mYwyUyAIQbrHttoah4qL9NNDH7NVbw3Y+PL+w8PpSpH8Cj 84Za3IA0v7xhvynpBaxf7ob1OiJvpeiiCxSDqvmB4ea8cAhc8c6FloHXmrtKuZhaFQps 4V/WiKmayf81KQX9vQdu3wicQ63VzWNdWGbrpb/XGFkrMwrEKjHOCULdVQIgxk/FtnHA 3XqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711731858; x=1712336658; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=y9pc5tzUbeYZ40tPh2Z5juvlwTQmtaSLEQNlLbslZ5Q=; b=TOyR2nOO0HIV14K4+9h4ItEzofSTu/4RZRZYqs/kmdfnXBJSuFalH9LKqVGmDQi5R4 jFQfewzSneq0o8uwnoJuV3qqIykG83++HNmPpNUj3wEJ7vKgUQk9gP+AdqlTE7Ze7K8f SBOGqEr2DDnZL+960DagLLqIhVvdf87Yy7V1WlZpxwN4VZk26G+X7jGU9Ez/WJZRvffT 5beVAnC1XhhRs9BZi+nZGPboFSe5EuSlMj1ifGEEmIwfjGR/xd4r6wjQcn15hMzmaDQ1 nzwqfg85OXNelRZejuvO2A5LhStnlIPFnB8t6hChzc/fCR9zTxPD+v23QOS6IeFWkkUn MJzg== X-Gm-Message-State: AOJu0YxIlDRzUH+tT7ClQLJCqEiKy9ft9m2PdAplGaWJNaBQaXpq0pR6 kEUu9kuQW2DeNKGLxvaqb+P8XduS7hUJkZTY4ELIrcWwuC8XhWBq8DGvssx3r2i+oaEWLdhAGTU L2vb3nADZkurezT9tOL/MQ9rhWl+QBN7w/f4= X-Google-Smtp-Source: AGHT+IGCMy6BjLan41T8+htYCvZmJ6l6dfrT36LZUi5s6A8Bu/POB8W/FIGJxY/qt5QQFXmlMU8PQ+AtCQ6T04oz6W0= X-Received: by 2002:a17:902:a9c2:b0:1e0:983c:d686 with SMTP id b2-20020a170902a9c200b001e0983cd686mr2554731plr.20.1711731857611; Fri, 29 Mar 2024 10:04:17 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=ss53g10@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 30 Mar 2024 02:02:57 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146197 Archived-At: 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 , 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 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