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))