From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: joostkremers@fastmail.fm, 22009@debbugs.gnu.org
Subject: bug#22009: PATCH: Use `window-total-width' in `window-splittable-p'
Date: Thu, 26 Nov 2015 20:36:28 +0200 [thread overview]
Message-ID: <83wpt4txoz.fsf@gnu.org> (raw)
In-Reply-To: <56574A0F.101@gmx.at>
> Date: Thu, 26 Nov 2015 19:06:07 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: joostkremers@fastmail.fm, 22009@debbugs.gnu.org
>
> >> Note that ‘window-splittable-p’ is exclusively used by ‘display-buffer’
> >> and the probability is very high that the new window will not be used
> >> for displaying the buffer of the original window. The new window will
> >> very likely have its own margins and header line.
> >
> > Is it forbidden to call that function from any other Lisp? If so,
> > disregard what I wrote. But if not, window-splittable-p should do a
> > correct job no matter who calls it, do you agree?
>
> Presently ‘window-splittable-p’ is misnamed and I think that's the main
> cause of the confusion. But its doc-string clearly names
> ‘split-window-sensibly’ as the caller (which is misnamed as well but all
> of these were written before ‘display-buffer’ was reorganized). In any
> case both functions belong exclusively to ‘display-buffer’ and are not
> related to C-x 3.
>
> > My text that you quoted here talks about the "normal" case, where the
> > margins stay put upon splitting windows. I'm saying that in such a
> > situation a decision made using the total width could be terribly
> > wrong.
>
> But the "normal" case where this happens is C-x 3 and there the mode
> that created the large margins should adapt.
>
> >> ‘window-min-width’ (and all related variables and functions) refer to
> >> the total width of windows. Changing its semantics would constitute
> >> quite some effort.
> >
> > If it's complicated, let's do that on master. But do it we must, IMO.
>
> Basically it would amount to ‘split-window-horizontally’ telling us that
> it can't split the window. Which might not be the intention of the user
> who expects the margins (whose sole purpose is to center the text in the
> window) to shrink accordingly.
>
> But honestly I don't know which implications changing the semantics of
> ‘window-min-width’ could have. I could imagine adding a new option say
> ‘window-min-text-width’ and have the resizing routines respect this as
> far as possible.
Maybe we should step back and recall what problem are we trying to
solve with the proposed patch, then.
> >> > The modes that triggered this are special in that they adapt their
> >> > margins to the split, but how would window-splittable-p know that?
> >> > Perhaps such modes should override that function, or maybe we should
> >> > provide a hook for them?
> >>
> >> This is not mode-triggered.
> >
> > In my text, "this" referred to this bug report.
>
> If you mean that a mode introducing large margins should override
> ‘split-window-sensibly’ then this is not TRT. ‘split-window-sensibly’
> is user territory and ‘window-splittable-p’ too.
Didn't you just tell they are called by display-buffer? How's that
"user territory"?
next prev parent reply other threads:[~2015-11-26 18:36 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 [this message]
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
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=83wpt4txoz.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=22009@debbugs.gnu.org \
--cc=joostkremers@fastmail.fm \
--cc=rudalics@gmx.at \
/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).