all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: stephen.berman@gmx.net, 34138@debbugs.gnu.org,
	politza@hochschule-trier.de, tsdh@gnu.org
Subject: bug#34138: 27.0.50; Delayed display of PDF file images
Date: Thu, 24 Jan 2019 10:08:53 +0100	[thread overview]
Message-ID: <5C4980A5.90902@gmx.at> (raw)
In-Reply-To: <8336pj8bhx.fsf@gnu.org>

 >> Strictly spoken, all of these abuse the concept of hooks.  Making a
 >> new window, putting an overlay there, setting some properties are
 >> deterministic actions.  Why do we have to do them from the hook?
 >
 > I don't know the answer, perhaps Andreas could explain his perspective
 > on this.

Many people (including me) do not understand the essence of most hooks
so they just replicate usage patterns from some other source.  While
the original idea of the hook often gets lost this way, packages work
in some way or the other satisfactorily.

 > Maybe this means what is now run_window_configuration_change_hook
 > should be divided into 2 parts: one that only reacts to changes in
 > dimensions, the other that reacts to new windows and changes in
 > window-buffer?  The former will want to run at the end of redisplay,
 > the latter at the beginning, I think.

This would double the potential ways of interleaved running of
functions on the hook.  I'd rather not do that.

 >> (1) Make the window.
 >>
 >> (2) Run 'image-mode-reapply-winprops'.
 >>
 >> (3) Run 'pdf-view-new-window-function'.
 >>
 >> (4) Continue with overlays and properties set up.
 >>
 >> (5) Redisplay, eventually.
 >>
 >> If anything in (4) needs anything done in (2) and (3), running the
 >> hooks earlier in redisplay won't help.
 >
 > I'm not sure I understand why, perhaps because I don't have a clear
 > idea what you mean by "continuing with overlays".  Please tell more.

When I say that steps (1)--(3) are deterministic I meant that making
the window is guaranteed to have run (2) and (3) before any action in
(4) gets executed.  In (4) the application may run arbitrary code with
the guarantee that the overlay from (3) and the "winprops" from (2)
have been installed.  Running 'window-configuration-change-hook' from
redisplay means this guarantee no longer holds.

 >> Note: We can always restore the emacs 26 (better emacs 25) way
 >> 'window-configuration-change-hook' is run.  That won't affect the
 >> remaining hooks and prevent scenarios as the one found here.
 >
 > What are the disadvantages of doing that?

That we again run the hook even if nothing has changed and do not
catch many possible changes.  Hence well-behaved users of that hook
would get punished.

I'm not sure whether I would care personally.  We never reached a
common agreement on what a window configuration change is and when it
happens.  So while the hook represents bad design (IMHO) and nobody
should ever have used it, there never existed a viable alternative to
accomplish what it provided in the past.

martin





  reply	other threads:[~2019-01-24  9:08 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19 21:13 bug#34138: 27.0.50; Delayed display of PDF file images Stephen Berman
2019-01-20  9:17 ` martin rudalics
2019-01-20 11:04   ` Andreas Politz
2019-01-20 14:19     ` martin rudalics
2019-01-20 11:18   ` Stephen Berman
2019-01-20 14:20     ` martin rudalics
2019-01-20 14:55       ` Stephen Berman
2019-01-20 15:32         ` Eli Zaretskii
2019-01-20 15:51           ` Stephen Berman
2019-01-20 16:08             ` Eli Zaretskii
2019-01-20 16:31               ` Stephen Berman
2019-01-20 16:50                 ` Eli Zaretskii
2019-01-20 17:14                   ` Stephen Berman
2019-01-20 17:42                     ` Eli Zaretskii
2019-01-20 20:45                       ` Stephen Berman
2019-01-21 15:58                         ` Eli Zaretskii
2019-01-21 16:13                           ` Stephen Berman
2019-01-21 16:36                             ` Eli Zaretskii
2019-01-21 18:17                               ` Stephen Berman
2019-01-21 18:42                                 ` Eli Zaretskii
2019-01-21 19:14                                   ` Andreas Politz
2019-01-21 19:47                                     ` Eli Zaretskii
2019-01-21 22:27                                       ` Stephen Berman
2019-01-22 16:25                                         ` Eli Zaretskii
2019-01-22 22:00                                           ` Stephen Berman
2019-01-23 14:31                                             ` Stephen Berman
2019-01-23 16:26                                               ` Eli Zaretskii
2019-01-23 17:22                                                 ` Stephen Berman
2019-01-23 16:13                                             ` Eli Zaretskii
2019-01-23 17:21                                               ` Stephen Berman
2019-01-23 22:20                                                 ` Stephen Berman
2019-01-23 18:27                                               ` martin rudalics
2019-01-23 18:39                                                 ` Eli Zaretskii
2019-01-24  9:08                                                   ` martin rudalics [this message]
2019-01-24 14:26                                                     ` Eli Zaretskii
2019-01-24 19:41                                                       ` Andreas Politz
2019-01-25  9:44                                                         ` martin rudalics
2019-01-26  9:19                                                       ` martin rudalics
2019-01-26 10:52                                                         ` Eli Zaretskii
2019-01-26 15:07                                                           ` martin rudalics
2019-01-26 15:33                                                             ` Stephen Berman
2019-02-02  9:28                                                               ` martin rudalics
2019-02-02  9:38                                                                 ` Andreas Politz
2019-02-19  8:47                                                                   ` martin rudalics
2019-02-02 12:59                                                                 ` Stephen Berman
2019-02-19  8:40                                                                   ` martin rudalics
2019-03-30  2:56                                                                     ` Noam Postavsky
2019-04-23  9:22                                                                       ` martin rudalics
2019-02-02  9:33                                                             ` Andreas Politz
2019-02-02  9:37                                                               ` martin rudalics
2019-01-21 20:33                                     ` Stephen Berman
2019-01-21 20:35                                       ` Eli Zaretskii
2019-01-21 20:43                                         ` Stephen Berman
2019-01-21 21:28                                           ` Andreas Politz
2019-01-21 18:47                                 ` martin rudalics
2019-01-21 19:19                                   ` Andreas Politz
2019-01-21 20:33                                     ` Stephen Berman
2019-01-20 17:55         ` martin rudalics
2019-01-20 20:45           ` Stephen Berman
2019-01-21  7:52             ` martin rudalics
2019-01-21 15:20               ` Stephen Berman
2019-01-21  6:11       ` Tassilo Horn
2019-01-21  7:52         ` martin rudalics
2019-01-21 15:20           ` Stephen Berman

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=5C4980A5.90902@gmx.at \
    --to=rudalics@gmx.at \
    --cc=34138@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=politza@hochschule-trier.de \
    --cc=stephen.berman@gmx.net \
    --cc=tsdh@gnu.org \
    /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.