When the functions purpose-display-reuse-window-buffer and purpose-display-reuse-window-purpose have multiple windows to choose from, they should prefer the selected window. This worked for a single frame, and now it also works over multiple frames.
The issue i had can be reproduced with GNU Emacs 25.3.2 as follows:
Start emacs -Q from the
Evaluate these statements:
(require 'cask "~/.cask/cask.el")
(cask-initialize)
(add-to-list 'load-path ".") ;; I started emacs from the window-purpose folder
(require 'window-purpose)
(purpose-mode)
(add-to-list 'display-buffer-alist
'("." nil (reusable-frames . t)))
(set-frame-name "FIRST FRAME")
(make-frame '((name . "SECOND FRAME")))
We should have two frames with names "FIRST FRAME" and "SECOND FRAME", both have a "scratch" buffer open with purpose [edit].
From the first frame, use C-x C-f to call purpose-find-file-overload and select a file.
The file is now opened in the second frame, but i expected it to open in the first one.
Coverage increased (+0.1%) to 67.416% when pulling b173e8897bf4af02573d953b95dba4cd5dcbaee6 on yoricksijsling:fix-prefer-window-in-same-frame into 2655bbe3399f00d3297ded58f92e7be22876148a on bmag:master.
Coverage increased (+0.1%) to 67.416% when pulling b173e8897bf4af02573d953b95dba4cd5dcbaee6 on yoricksijsling:fix-prefer-window-in-same-frame into 2655bbe3399f00d3297ded58f92e7be22876148a on bmag:master.
When the functions
purpose-display-reuse-window-buffer
andpurpose-display-reuse-window-purpose
have multiple windows to choose from, they should prefer the selected window. This worked for a single frame, and now it also works over multiple frames.The issue i had can be reproduced with GNU Emacs 25.3.2 as follows:
emacs -Q
from theEvaluate these statements:
We should have two frames with names "FIRST FRAME" and "SECOND FRAME", both have a "scratch" buffer open with purpose
[edit]
.C-x C-f
to callpurpose-find-file-overload
and select a file.The file is now opened in the second frame, but i expected it to open in the first one.