From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34138: 27.0.50; Delayed display of PDF file images Date: Thu, 24 Jan 2019 16:26:01 +0200 Message-ID: <83sgxi6sjq.fsf@gnu.org> References: <871s58e4gh.fsf@gmx.net> <87h8e3h90z.fsf@gmx.net> <5C4483B7.1060604@gmx.at> <87d0orgz0a.fsf@gmx.net> <837eezbazk.fsf@gnu.org> <878szfgwdu.fsf@gmx.net> <8336pnb9cq.fsf@gnu.org> <874la3gujy.fsf@gmx.net> <831s57b7ev.fsf@gnu.org> <87zhrvfdzu.fsf@gmx.net> <83zhrv9qe5.fsf@gnu.org> <87sgxnf48d.fsf@gmx.net> <83pnsq9f47.fsf@gnu.org> <871s56dm5q.fsf@gmx.net> <83lg3e9dd6.fsf@gnu.org> <87womxdgdq.fsf@gmx.net> <83fttlam3b.fsf@gnu.org> <87sgxlrfgg.fsf@hochschule-trier.de> <83bm49aj3q.fsf@gnu.org> <87a7jtd4sx.fsf@gmx.net> <834la0accs.fsf@gnu.org> <87lg3cfjef.fsf@gmx.net> <83lg3b8i8a.fsf@gnu.org> <5C48B20C.9030100@gmx.at> <8336pj8bhx.fsf@gnu.org> <5C4980A5.90902@gmx.at> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="229680"; mail-complaints-to="usenet@blaine.gmane.org" Cc: stephen.berman@gmx.net, 34138@debbugs.gnu.org, politza@hochschule-trier.de, tsdh@gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 24 15:27:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmfyV-000xdc-8K for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jan 2019 15:27:23 +0100 Original-Received: from localhost ([127.0.0.1]:54837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmfyT-00051Y-TV for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Jan 2019 09:27:21 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:44161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmfyG-0004zL-Ax for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2019 09:27:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmfyE-0002Li-BU for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2019 09:27:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44117) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmfyA-0002JC-2M for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2019 09:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gmfy9-0000JC-MI for bug-gnu-emacs@gnu.org; Thu, 24 Jan 2019 09:27:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Jan 2019 14:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34138 X-GNU-PR-Package: emacs Original-Received: via spool by 34138-submit@debbugs.gnu.org id=B34138.15483399801134 (code B ref 34138); Thu, 24 Jan 2019 14:27:01 +0000 Original-Received: (at 34138) by debbugs.gnu.org; 24 Jan 2019 14:26:20 +0000 Original-Received: from localhost ([127.0.0.1]:43398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gmfxT-0000IE-IS for submit@debbugs.gnu.org; Thu, 24 Jan 2019 09:26:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33705) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gmfxR-0000Hx-HY for 34138@debbugs.gnu.org; Thu, 24 Jan 2019 09:26:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmfxK-0001Ye-6V; Thu, 24 Jan 2019 09:26:11 -0500 Original-Received: from [176.228.60.248] (port=2255 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gmfxJ-00019u-4X; Thu, 24 Jan 2019 09:26:10 -0500 In-reply-to: <5C4980A5.90902@gmx.at> (message from martin rudalics on Thu, 24 Jan 2019 10:08:53 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:154724 Archived-At: > Date: Thu, 24 Jan 2019 10:08:53 +0100 > From: martin rudalics > CC: stephen.berman@gmx.net, politza@hochschule-trier.de, > 34138@debbugs.gnu.org, tsdh@gnu.org > > >> (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. I think the overlay is definitely installed, just not before redisplay examines the windows. > >> 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. I'd like to see if there's a less radical solution. Andreas, could you please help me? I'd like to have a way of reproducing the problem with pdf-tools, but without poppler. Would it be possible for you to show me some Lisp that use pdf-tools (or even image-mode directly) to just display some fixed image, say splash.png from etc/images, in the same way, i.e. using the same hooks, as you do with a PDF document? I tried to write a very simplified version of pdf-view.el for that purpose, but either my emulation was imperfect or there are OS-dependent factors that get in the way, because with the code I wrote the image appears immediately. It is important for me to run code for which I know that you and Stephen see the problem. Armed with such a test case, I will see what can be done to fix the behavior. Thanks.