all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 32672@debbugs.gnu.org, juri@linkov.net
Subject: bug#32672: 27.0.50; image resize on window resizing
Date: Tue, 25 Sep 2018 12:19:09 +0300	[thread overview]
Message-ID: <837eja9boy.fsf@gnu.org> (raw)
In-Reply-To: <5BA9E337.5000806@gmx.at> (message from martin rudalics on Tue, 25 Sep 2018 09:26:47 +0200)

> Date: Tue, 25 Sep 2018 09:26:47 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: juri@linkov.net, 32672@debbugs.gnu.org
> 
>  >> As I said, redisplay would not have to care about that at all.  It
>  >> would simply call 'window-state-change-functions' where it calls
>  >> 'window-size-change-functions' now.  And running
>  >> 'window-state-change-functions' would use one boolean set (among
>  >> others) instead of where 'run-window-configuration-change-hook' gets
>  >> called now and which it resets.  Iff that boolean was set, it would
>  >> start to find all windows where a relevant change occurred and run the
>  >> functions.  Buffer-locally iff a window shows the buffer for which the
>  >> local hook was set and something changed for that window.
>  >
>  > Those functions will need to keep track of the changes, or record the
>  > previous state attributes somewhere, to do their job, right?  Are you
>  > saying that these are already recorded/tracked?  If not, they will
>  > need to be added, which was the point I was making.
> 
> I'm not sure what you mean with "Those functions".

I mean window-state-change-functions, what else?

> Running 'window-size-change-functions' already records the current
> sizes in preparation for the call during next redisplay.
> 'window-state-change-functions' would do the same for the values it
> manages.

We are talking about hypothetical function(s), so it may well be that
there's some misunderstanding.  My point is that accurate recording of
window-size changes is hard, because the various variables used for
that might be outdated (e.g., due top a redisplay cycle that didn't
complete).  Also, redisplay_internal, which calls those functions,
will sometimes call them more than once in a redisplay cycle (see the
'retry' label and code that jumps back to it).

Bottom line is what I said up-thread: Lisp programs cannot expect
those hook calls to be too accurate and focused, they need to be
prepared to handle many irrelevant calls, and they had better have
their own bookkeeping regarding window dimensions etc.

>  > Even the "once" part might be problematic, because redisplay_internal
>  > sometimes re-runs its code more than once, as you know.  The "really
>  > changed since last redisplay" is even trickier, because a given
>  > redisplay cycle doesn't always finish all of its job, it can stop in
>  > the middle and return after doing only part of what needs to be done,
>  > in which case some of the windows are not updated, and we will have
>  > lost our point of reference.
> 
> What you mention here would affect 'window-size-change-functions'
> already now.  I see no great harm in that.

Neither do I; my point, once again, is that expectations should be
quite low.





  reply	other threads:[~2018-09-25  9:19 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-09 15:54 bug#32672: 27.0.50; image resize on window resizing Juri Linkov
2018-09-11 23:53 ` Juri Linkov
2018-09-12  6:33   ` martin rudalics
2018-09-12 23:18     ` Juri Linkov
2018-09-13  7:46       ` martin rudalics
2018-09-13 23:20         ` Juri Linkov
2018-09-14  8:33           ` martin rudalics
2018-09-15 23:35             ` Juri Linkov
2018-09-16  9:10               ` martin rudalics
2018-09-16 23:49                 ` Juri Linkov
2018-09-17  6:46                   ` martin rudalics
2018-09-17 22:35                     ` Juri Linkov
2018-09-19  8:22                       ` martin rudalics
2018-09-19 23:15                         ` Juri Linkov
2018-09-20  7:34                           ` martin rudalics
2018-09-20 23:15                             ` Juri Linkov
2018-09-21  6:34                               ` martin rudalics
2018-09-22 22:15                                 ` Juri Linkov
2018-09-23  8:26                                   ` martin rudalics
2018-09-23 20:39                                     ` Juri Linkov
2018-09-24  8:22                                       ` martin rudalics
2018-09-24  8:35                                         ` Eli Zaretskii
2018-09-24 12:25                                           ` martin rudalics
2018-09-24 12:46                                             ` Eli Zaretskii
2018-09-24 17:37                                               ` martin rudalics
2018-09-24 17:53                                                 ` Eli Zaretskii
2018-09-25  7:26                                                   ` martin rudalics
2018-09-25  9:19                                                     ` Eli Zaretskii [this message]
2018-09-25 17:56                                                       ` martin rudalics
2018-09-25 18:31                                                         ` Eli Zaretskii
2018-09-24 18:38                                           ` Juri Linkov
2018-09-24 19:31                                             ` Eli Zaretskii
2018-09-25  7:27                                             ` martin rudalics
2018-09-25 19:24                                               ` Juri Linkov
2018-09-26  8:51                                                 ` martin rudalics
2018-10-27 19:38                                                   ` Juri Linkov
2018-10-28  8:59                                                     ` martin rudalics
2018-09-24 18:31                                         ` Juri Linkov
2018-09-25  7:27                                           ` martin rudalics
2018-12-26 23:42 ` Juri Linkov
2018-12-27  9:36   ` martin rudalics
2018-12-27 21:41     ` Juri Linkov
2018-12-28  8:34       ` martin rudalics
2018-12-27 15:48   ` Eli Zaretskii
2018-12-27 20:58     ` Juri Linkov
2018-12-28  4:51       ` Eli Zaretskii
2019-09-26 13:27   ` Lars Ingebrigtsen
2019-11-27 21:53     ` Juri Linkov
2019-11-28  9:20       ` martin rudalics
2019-11-28 22:50         ` Juri Linkov
2019-11-29  9:24           ` 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=837eja9boy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32672@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --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.