[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I force updating mini window's header line when mode line is
Re: How can I force updating mini window's header line when mode line is updated?
Thu, 26 Apr 2018 01:16:57 +0800
mu4e 1.0-alpha3; emacs 27.0.50
Um I'm afraid post-command-hook might not help here. Emacs code
has deep assumption of mini window having only one line. After I
turn on the header line, things become messy. I'll try collecting
all the hard-coded logic and see if this route indeed works.
Here is what I've achieved so far
Stefan Monnier <address@hidden> writes:
3. (setq-default header-line-format mode-line-format)
Hmm... this would put a header-line on all windows, whereas IIUC
want a header-line only for the mini-window, right?
However the header line doesn't get updated at all.
A window's header-line (and mode-line) will normally only be
updated if something happens in this window that would require
updating it. Part of this detection of when update is needed is
automatic, tho not all of it (so Elisp code sometimes has to
In your case, the header-line belongs to the mini-window, so
detection (and most of existing Elisp code calling
force-mode-line-update) won't help because it will only detect a
for update when the *mini-window* is affected, whereas you most
want to update it in many other cases.
So you'll probably want to add some `post-command-hook` (and/or
related hooks) to try and detect when an update is needed, at
point you'll need to do
It seems xdisp.c only
provides ways to update mode line, and I've reached the limit
emacs-fu. How can I achieve this without hacking tons of the
AFAIK the redisplay doesn't really distinguish the mode-line
header-line in this respect (e.g. force-mode-line-update will
the mode-line and the header-line to be refreshed).