GNU bug report logs - #50867
27.2; window-toggle-side-windows adds an extra window

Previous Next

Package: emacs;

Reported by: Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com>

Date: Tue, 28 Sep 2021 15:09:02 UTC

Severity: normal

Tags: fixed

Found in version 27.2

Fixed in version 28.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50867 in the body.
You can then email your comments to 50867 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50867; Package emacs. (Tue, 28 Sep 2021 15:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 28 Sep 2021 15:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; window-toggle-side-windows adds an extra window
Date: Tue, 28 Sep 2021 16:55:49 +0530
[Message part 1 (text/plain, inline)]

1. start a vanila emacs session
2. using scratch buffer, use follow display buffer alist configuration

(setq display-buffer-alist
          '(("\\*\\(Async Shell Command\\|Shell Command Output\\)\\*"
         (display-buffer-reuse-window display-buffer-in-side-window)
         (window-width . 0.40)
         (side . right)
         (slot . 0))))

3. split the window horizontally using `C-x 3`
4. run `M-x async-shell-command ls RET`
5. run `M-x window-toggle-side-windows`
6. run `M-x window-toggle-side-windows`

You will see that there is an extra, window added, to the frame.



In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
of 2021-03-28 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.2022
System Description:  macOS 11.6

Recent messages:
(No changes need to be saved)
Mark set
Quit
Mark set
Scanning for dabbrevs...done
user-error: No dynamic expansion for ‘window-toggle-side-windows`’ found
Mark set
(("\\*\\(Async Shell Command\\|Shell Command Output\\)\\*" (display-buffer-reuse-window display-buffer-in-side-window) (window-width . 0.4) (side . right) (slot . 0)))
You can run the command ‘async-shell-command’ with M-&
ls: finished.

Configured using:
'configure --with-ns '--enable-locallisppath=/Library/Application
Support/Emacs/${version}/site-lisp:/Library/Application
Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES
THREADS JSON PDUMPER GMP

Important settings:
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  global-company-mode: t
  company-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  shell-dirtrack-mode: t
  ivy-mode: t
  which-key-mode: t
  global-page-break-lines-mode: t
  page-break-lines-mode: t
  override-global-mode: t
  recentf-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/indrajeet.khandekar/.emacs.d/elpa/magit-3.2.1/magit-section-pkg hides /Users/indrajeet.khandekar/.emacs.d/elpa/magit-section-3.2.1/magit-section-pkg

Features:
(shadow sort mail-extr emacsbug sendmail dabbrev gnus-msg gnus-art mm-uu
mml2015 mm-view mml-smime smime dig sh-script smie executable
org-archive ediff-ptch diff-mode ediff ediff-merg ediff-mult ediff-diff
ediff-util ediff-wind ediff-help ediff-init bookmark pp tabify
org-capture rx org-duration tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat diary-lib diary-loaddefs cal-iso
org-element avl-tree ol-eww eww mm-url url-queue ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnir gnus-sum shr svg dom gnus-group gnus-undo
gnus-start gnus-cloud nnimap nnmail mail-source utf7 netrc nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range message rfc822 mml
mml-sec epa derived epg epg-config mailabbrev gmm-utils mailheader
gnus-win gnus nnheader gnus-util rmail rmail-loaddefs
text-property-search ol-docview doc-view jka-compr image-mode exif dired
dired-loaddefs ol-bibtex bibtex ol-bbdb ol-w3m face-remap org-agenda
org-refile disp-table tsdh-light-theme company-oddmuse company-keywords
company-etags company-gtags company-dabbrev-code company-dabbrev
company-files company-capf company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-bbdb company
pcase helpful imenu trace edebug backtrace info-look f dash-functional
help-fns radix-tree elisp-refs s loop evil evil-keybindings
evil-integration undo-tree diff evil-maps evil-commands reveal flyspell
ispell evil-jumps evil-command-window evil-types evil-search evil-ex
shell evil-macros evil-repeat evil-states evil-core evil-common windmove
rect evil-digraphs evil-vars go-mode find-file ffap thingatpt etags
fileloop generator xref project compile ivy delsel ivy-faces ivy-overlay
colir color restart-emacs which-key org-jira org-jira-sdk jiralib
request autorevert filenotify mail-utils soap-client mm-decode mm-bodies
mm-encode url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr url-gw nsm rmc puny warnings rng-xsd rng-dt
rng-util xsd-regexp xml dash ls-lisp org-clock org ob ob-tangle ob-ref
ob-lob ob-table ob-exp org-macro org-footnote org-src ob-comint
org-pcomplete pcomplete comint ansi-color org-list org-faces
org-entities time-date noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-table ol org-keys org-compat org-macs org-loaddefs
advice find-func cal-menu calendar cal-loaddefs diminish
page-break-lines hackernews url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
format-spec cus-edit cus-start cus-load use-package use-package-delight
use-package-diminish edmacro kmacro use-package-bind-key bind-key
easy-mmode recentf tree-widget wid-edit modus-themes hydra ring lv
cl-extra help-mode use-package-ensure use-package-core finder-inf info
package easymenu browse-url url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite charscript charprop case-table epa-hook jka-cmpr-hook help
simple abbrev obarray cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
threads kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 603783 58939)
(symbols 48 41058 1)
(strings 32 154720 6728)
(string-bytes 1 4854491)
(vectors 16 64354)
(vector-slots 8 1113676 73410)
(floats 8 594 916)
(intervals 56 6181 3118)
(buffers 1000 42))
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50867; Package emacs. (Wed, 29 Sep 2021 09:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 50867 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com>,
 50867 <at> debbugs.gnu.org
Subject: Re: bug#50867: 27.2; window-toggle-side-windows adds an extra window
Date: Wed, 29 Sep 2021 11:28:02 +0200
> 1. start a vanila emacs session
> 2. using scratch buffer, use follow display buffer alist configuration
>
> (setq display-buffer-alist
>            '(("\\*\\(Async Shell Command\\|Shell Command Output\\)\\*"
>           (display-buffer-reuse-window display-buffer-in-side-window)
>           (window-width . 0.40)
>           (side . right)
>           (slot . 0))))
>
> 3. split the window horizontally using `C-x 3`
> 4. run `M-x async-shell-command ls RET`
> 5. run `M-x window-toggle-side-windows`
> 6. run `M-x window-toggle-side-windows`
>
> You will see that there is an extra, window added, to the frame.
>
>
>
> In GNU Emacs 27.2 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
> of 2021-03-28 built on builder10-14.porkrind.org
> Windowing system distributor 'Apple', version 10.3.2022
> System Description:  macOS 11.6

Thanks for the report.  I hopefully fixed this now for Emacs 28.  If you
want this to work for Emacs 27, please apply the patch below and either
rebuild Emacs or put the definition of 'window-toggle-side-windows' into
your .emacs.

All the best, martin


diff --git a/lisp/window.el b/lisp/window.el
index b240b16f24..1b02eff17b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1212,7 +1216,8 @@ window-toggle-side-windows
      ((setq state (frame-parameter frame 'window-state))
       ;; A window state was saved for FRAME.  Restore it and put the
       ;; current root window into its main window.
-      (let ((main-state (window-state-get (frame-root-window frame))))
+      (let ((window-combination-resize t)
+            (main-state (window-state-get (frame-root-window frame))))
         (window-state-put state (frame-root-window frame) t)
         (window-state-put main-state (window-main-window frame)))
       (window--sides-reverse-frame frame))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50867; Package emacs. (Thu, 30 Sep 2021 16:17:02 GMT) Full text and rfc822 format available.

Message #11 received at 50867 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com>
Cc: 50867 <at> debbugs.gnu.org
Subject: Re: bug#50867: 27.2; window-toggle-side-windows adds an extra window
Date: Thu, 30 Sep 2021 18:16:17 +0200
tags 50867 fixed
close 50867 28.1
quit

> Thank you :)

OK.  Closing this bug.

martin




Added tag(s) fixed. Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Thu, 30 Sep 2021 16:17:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 50867 <at> debbugs.gnu.org and Indrajeet Khandekar <indrajeet.khandekar <at> taranawireless.com> Request was from martin rudalics <rudalics <at> gmx.at> to control <at> debbugs.gnu.org. (Thu, 30 Sep 2021 16:17:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 29 Oct 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 180 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.