all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: Window change functions
Date: Sat, 05 Jan 2019 01:17:57 -0500	[thread overview]
Message-ID: <jwv8szzpsjd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83k1jv6k11.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 27 Dec 2018 17:56:10 +0200")

>>  >> +@defvar window-state-change-functions
>>  >> +This variable specifies functions called at the end of redisplay when
>>  >> +window states have changed.  The value should be a list of functions
>>  >> +that take one argument
>>  > If it's run "at the end of redisplay", then I think it's too late: those
>>  > hooks will often want to change something visual, and they will want it
>>  > to appear right away, so it should be run just *before* redisplay.
>> Note that 'window-size-change-functions' are currently already run
>> right in the middle of redisplay.  Often, window sizes are correct
>> only *after* redisplay.  Think of minibuffer window resizing or
>> changes in the fringes, margins or modeline sub-structures.  But a
>> final word on the location of the call will have to be told by Eli.
> I don't think I can utter that final word, primarily because I don't
> understand Stefan's concerns.  Stefan, could you please elaborate?

For example, I have a window-size-change-functions which I use to
re-balance windows (using balance-window-area) after a frame resize.
It doesn't care about the exact window sizes when it's called, so having
correct window sizes when it's called is not necessary.  OTOH redisplay
will need to happen right after it was run, because it changes
window sizes.  So the best time to run it is right before redisplay.


        Stefan



  reply	other threads:[~2019-01-05  6:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-25  9:41 Window change functions martin rudalics
2018-12-25 20:13 ` Gnus crash (was: Window change functions) Juri Linkov
2018-12-25 20:39   ` Gnus crash Stefan Monnier
2018-12-26  9:19     ` Paul Eggert
2018-12-26 22:22       ` Juri Linkov
2018-12-26 19:55 ` Window change functions Stefan Monnier
2018-12-27  9:36   ` martin rudalics
2018-12-27 15:56     ` Eli Zaretskii
2019-01-05  6:17       ` Stefan Monnier [this message]
2019-01-05  7:20         ` Eli Zaretskii
2019-01-05 10:18         ` martin rudalics
2019-01-06 17:22           ` Stefan Monnier
2019-01-07  9:03             ` martin rudalics
2019-01-08 18:10               ` Stefan Monnier
2019-01-09 10:02                 ` martin rudalics
2019-01-11  9:23                   ` martin rudalics
2019-01-05  6:13     ` Stefan Monnier
2019-01-05 10:18       ` martin rudalics

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8szzpsjd.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.