Closed fleimgruber closed 4 months ago
I narrowed this down to my local layer config, will bisect some more.
It turns out the offending parts were these, based on https://www.masteringemacs.org/article/demystifying-emacs-window-manager#example-2-reusing-windows. Might well be an oversight on my part. I did not dissect it further, just wanted to have it here for reference if others stumble in a similar way.
(setq switch-to-buffer-obey-display-actions t)
(add-to-list 'display-buffer-alist
`(,(rx (| "*xref*"
"*grep*"
"*Occur*"
(and "*deadgrep" (* not-newline) "*")))
display-buffer-reuse-window
(inhibit-same-window . nil)))
(add-to-list 'display-buffer-alist
'(,(rx (and "*deadgrep" (* not-newline) "*"))
display-buffer-reuse-mode-window
;; change to `t' to not reuse same window
(inhibit-same-window . nil)
(mode deadgrep-mode)))
(defun make-display-buffer-matcher-function (major-modes)
(lambda (buffer-name action)
(with-current-buffer buffer-name (apply #'derived-mode-p major-modes))))
(add-to-list 'display-buffer-alist
`(,(make-display-buffer-matcher-function '(deadgrep-mode))
(display-buffer-reuse-mode-window
display-buffer-in-direction)
(mode deadgrep-mode)))
Description :octocat:
Transient state replaces current buffer contents with transient buffer contents
Reproduction guide :beetle:
Tested with two different transient states: paste and spell-checking
OR:
Observed behaviour: :eyes: :broken_heart: Current buffer gets replaced with transient state buffer, e.g. in case of spell checking
Expected behaviour: :heart: :smile: Transient state buffer gets created in a different window, current buffer contents are not replaced.
System Info :computer:
Backtrace :paw_prints: