Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer the selected window even with multiple frames #121

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

yoricksijsling
Copy link
Contributor

@yoricksijsling yoricksijsling commented Mar 9, 2018

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:

  1. Start emacs -Q from the
  2. 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].
  3. 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.

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.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 67.416% when pulling b173e88 on yoricksijsling:fix-prefer-window-in-same-frame into 2655bbe on bmag:master.

1 similar comment
@coveralls
Copy link

coveralls commented Mar 9, 2018

Coverage Status

Coverage increased (+0.1%) to 67.416% when pulling b173e88 on yoricksijsling:fix-prefer-window-in-same-frame into 2655bbe on bmag:master.

@bmag bmag merged commit b173e88 into bmag:master Aug 9, 2018
@bmag
Copy link
Owner

bmag commented Aug 9, 2018

Thanks, merged. I did a minor refactor in c75d619

@yoricksijsling yoricksijsling deleted the fix-prefer-window-in-same-frame branch September 17, 2019 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants