unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How can I force updating mini window's header line when mode line is updated?
@ 2018-04-25 12:41 Amos Bird
  2018-04-25 16:10 ` Eli Zaretskii
  2018-04-25 16:20 ` Stefan Monnier
  0 siblings, 2 replies; 9+ messages in thread
From: Amos Bird @ 2018-04-25 12:41 UTC (permalink / raw)
  To: help-gnu-emacs

Dear community,

I'm trying to setup one mode line per frame. Here is what I've 
done.

1. turn on the head line of mini window by tweaking 
window_wants_header_line.
2. change shrink_mini_window so that it shrinks mini window to two 
lines instead of one.
3. (setq-default header-line-format mode-line-format)

Here is what I got https://la.wentropy.com/48Yx.png

However the header line doesn't get updated at all. It seems 
xdisp.c only provides ways to update mode line, and I've reached 
the limit of my emacs-fu. How can I achieve this without hacking 
tons of the display logic? Many thanks!

regards,

--
Amos Bird
amosbird@gmail.com



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: How can I force updating mini window's header line when mode line is updated?
@ 2018-04-26  7:04 martin rudalics
  2018-04-27  2:52 ` Amos Bird
  2018-06-27 15:14 ` John Yates
  0 siblings, 2 replies; 9+ messages in thread
From: martin rudalics @ 2018-04-26  7:04 UTC (permalink / raw)
  To: amosbird; +Cc: help-gnu-emacs

 > Emacs code has deep assumption of mini window having only one line.

This is not entirely correct.  As long as other windows on the same
frame fit, a minibuffer window can get quite large (see
'max-mini-window-height').  But in some parts of the window and
redisplay code we assume that minibuffer windows behave like pseudo
windows (those used for displaying the tool bar or the menu bar on
some platforms) or internal windows - they can't have dividers, a mode
or a header line because these are simply not counted when displaying
the window or calculating its height.  That's why you observe that

 > After I turn on the header line, things become messy.

For example, 'window_wants_header_line' in window.c cannot deal with
that.

 > I'll try
 > collecting all the hard-coded logic and see if this route indeed
 > works.

Good idea.  Note that I'm currently changing a number of things
related to minibuffer windows which, among others, should allow them
to appear anywhere on a frame or even not being displayed at all.  So
I do not think that displaying the mode line of a frame within the
minibuffer window is a good idea in the first place.  Even presently,
people who use standalone minibuffer frames might not be very
enthralled by the idea that they have to look on their minibuffer
frame for consulting the mode line contents.

I think that if we want frame-local modelines which, IIUC should
display the mode line contents of the frame's selected window, it
might be a better idea to add a new kind of pseudo window on top or
bottom of a frame for that.

martin



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-06-28  7:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-25 12:41 How can I force updating mini window's header line when mode line is updated? Amos Bird
2018-04-25 16:10 ` Eli Zaretskii
2018-04-25 17:12   ` Amos Bird
2018-04-25 16:20 ` Stefan Monnier
2018-04-25 17:16   ` Amos Bird
  -- strict thread matches above, loose matches on Subject: below --
2018-04-26  7:04 martin rudalics
2018-04-27  2:52 ` Amos Bird
2018-06-27 15:14 ` John Yates
2018-06-28  7:37   ` martin rudalics

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).