From: Joost Kremers <joostkremers@fastmail.fm>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22009@debbugs.gnu.org
Subject: bug#22009: PATCH: Use `window-total-width' in `window-splittable-p'
Date: Tue, 01 Dec 2015 13:59:36 +0100 [thread overview]
Message-ID: <87d1uqz5mv.fsf@fastmail.fm> (raw)
In-Reply-To: <83mvtzqhz5.fsf@gnu.org>
On Fr, Nov 27 2015, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Joost Kremers <joostkremers@fastmail.fm>
>> Date: Fri, 27 Nov 2015 02:16:22 +0100
>>
>> The problem I'd like to solve (and the reason I submitted the patch) is
>> that if a window has wide margins that are used to center the text,
>> `window-splittable-p' will say that the window cannot be split
>> horizontally, even though it can, because the margins are disposable.
>>
>> But actually, that's not the real problem. The real problem is that
>> `window-splittable-p' simply has too little information to make an
>> informed decision.
>>
>> The point is that the margins may be used for two different kinds of
>> purposes:
>>
>> (1) The margins can be used to display useful information, in which case
>> they should be retained when the window is split.
>>
>> (2) The margins can be used to reduce the width of the text area. In
>> this case, the margins are disposable.
>
> There's one more factor here: whether the margins will remain at their
> width after splitting.
Yes, that is the actual issue. The point is that the way the margins are
used determines whether they must remain at their width after splitting
or not.
> The mode which you presented and where the
> current behavior was a problem changed the margins width as result of
> the split (AFAIU),
Yes, you understand correctly.
> which is something the split decision cannot
> possibly know.
As things stand, no.
> So I don't see how we could solve the problem even in
> principle if we want to handle such modes correctly.
By keeping track of which modes set the margins and whether they can be
reduced in case of a window split or not, as discussed in the thread on
emacs-devel.
> The only way is
> to ask the modes themselves, or provide a hook for them to override
> the decision.
I'm not sure that would be able to handle cases where different modes
use the margins for different purposes.
--
Joost Kremers
Life has its moments
next prev parent reply other threads:[~2015-12-01 12:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 13:07 bug#22009: PATCH: Use `window-total-width' in `window-splittable-p' Joost Kremers
2015-11-25 17:48 ` martin rudalics
2015-11-25 18:04 ` Eli Zaretskii
2015-11-25 18:14 ` martin rudalics
2015-11-25 19:15 ` Eli Zaretskii
2015-11-26 8:23 ` martin rudalics
2015-11-26 15:46 ` Eli Zaretskii
2015-11-26 16:58 ` martin rudalics
2015-11-26 17:25 ` Eli Zaretskii
2015-11-26 18:06 ` martin rudalics
2015-11-26 18:36 ` Eli Zaretskii
2015-11-27 8:27 ` martin rudalics
2015-11-27 20:51 ` Eli Zaretskii
2015-11-28 10:26 ` martin rudalics
2015-11-28 14:49 ` Eli Zaretskii
2015-11-28 15:49 ` martin rudalics
2015-12-01 12:47 ` Joost Kremers
2015-11-27 1:16 ` Joost Kremers
2015-11-27 8:28 ` martin rudalics
2015-12-01 14:11 ` Joost Kremers
2015-11-27 20:56 ` Eli Zaretskii
2015-12-01 12:59 ` Joost Kremers [this message]
2015-12-01 15:44 ` Eli Zaretskii
2015-12-01 17:31 ` Joost Kremers
2020-09-07 16:48 ` Lars Ingebrigtsen
2020-09-08 8:50 ` Joost Kremers
2020-09-08 10:05 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1uqz5mv.fsf@fastmail.fm \
--to=joostkremers@fastmail.fm \
--cc=22009@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).