Fix editor viewport placement and temporary recentf entries#447
Merged
Conversation
cxa
force-pushed
the
fix/editor-viewport-window-placement
branch
4 times, most recently
from
July 20, 2026 08:33
2303d59 to
1eb2264
Compare
tninja
reviewed
Jul 20, 2026
tninja
left a comment
Owner
There was a problem hiding this comment.
Thank you for the thoughtful contribution and the thorough viewport coverage. I left three non-blocking suggestions for a few edge cases.
cxa
force-pushed
the
fix/editor-viewport-window-placement
branch
from
July 20, 2026 16:07
1eb2264 to
c1787ad
Compare
Keep editor viewports on the frame selected when placement starts and use a deterministic fallback order: below, right, left, then replace. Attempt below placement only when the source has at least 24 lines, target a 12-line viewport, accept an 8-line minimum, and accept side placement only when both the source and viewport remain at least 24 columns wide. Split side-window sessions directly into normal viewport windows so all four side positions follow the same fallback policy without creating same-side siblings. Roll back failed attempts, preserve restoration after layout transposition, and keep frame-producing display actions out of the controlled chain. Exclude external-editor staging files from recentf without changing user configuration. Cover dimension boundaries, normal and side-window geometry, fallback ordering, selected-frame isolation, no-frame behavior, layout transposition, restoration, cancel/save flows, and recentf bindings. Keep the transpose checks compatible with the minimum supported Emacs by exercising window-x only when it is available.
cxa
force-pushed
the
fix/editor-viewport-window-placement
branch
from
July 21, 2026 00:12
c1787ad to
ffac959
Compare
tninja
approved these changes
Jul 21, 2026
tninja
left a comment
Owner
There was a problem hiding this comment.
Thank you for the contribution and the thoughtful follow-up fixes. Looks good to me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
window-layout-transpose.recentfwithout changing user configuration.Motivation
Editor viewport requests could fail when below placement was unavailable, unexpectedly use another frame, or produce invalid same-side window trees after layout transposition. Temporary external-editor files could also appear in
recentf.This change makes placement deterministic, preserves usable source dimensions, rolls back failed layout attempts, and safely restores the original session after the viewport closes.
Verification
git diff --checkpass.recentfexclusion.