xenodium / chatgpt-shell

A multi-llm Emacs shell (ChatGPT, Claude, Gemini) + editing integrations
https://xenodium.com
GNU General Public License v3.0
846 stars 75 forks source link

Introduce an option to re-use window showing transient buffer. #209

Closed solodov closed 5 months ago

solodov commented 5 months ago

Fixes xenodium/chatgpt-shell#208

steveyegge commented 5 months ago

🎉🎉🎉 Woohoo!

xenodium commented 5 months ago

As of https://github.com/xenodium/chatgpt-shell/commit/35437f283daa92946d549060b03ea4ac72d645cf, we should be able to reuse windows more idiomatically via display-buffer-alist. For example:

(add-to-list 'display-buffer-alist
             (cons '(major-mode . chatgpt-shell-prompt-compose-mode)
                   '((display-buffer-reuse-window
                      display-buffer-in-direction
                      display-buffer-select)
                     (reusable-frames . visible)
                     (direction . left)
                     (window-width . 0.35))))