From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#34138: 27.0.50; Delayed display of PDF file images Date: Sun, 20 Jan 2019 15:55:01 +0100 Message-ID: <87d0orgz0a.fsf@gmx.net> References: <871s58e4gh.fsf@gmx.net> <5C443CB1.3050208@gmx.at> <87h8e3h90z.fsf@gmx.net> <5C4483B7.1060604@gmx.at> NNTP-Posting-Host: ciao.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ciao.gmane.org 1547996167 67061 195.159.176.228 (20 Jan 2019 14:56:07 GMT) X-Complaints-To: usenet@ciao.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2019 14:56:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 34138@debbugs.gnu.org, Andreas Politz , Tassilo Horn To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 20 15:56:05 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1glEW4-000HQf-1j for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2019 15:56:04 +0100 Original-Received: from localhost ([127.0.0.1]:40843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glEWC-0002XR-VK for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2019 09:56:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glEW4-0002V7-0h for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 09:56:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glEW2-0005mc-HO for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 09:56:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glEW2-0005mS-DO for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 09:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1glEW2-0003II-6W for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2019 09:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jan 2019 14:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34138 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 34138-submit@debbugs.gnu.org id=B34138.154799611512085 (code B ref 34138); Sun, 20 Jan 2019 14:56:02 +0000 Original-Received: (at 34138) by debbugs.gnu.org; 20 Jan 2019 14:55:15 +0000 Original-Received: from localhost ([127.0.0.1]:38532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glEVG-00038l-8q for submit@debbugs.gnu.org; Sun, 20 Jan 2019 09:55:15 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:55479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glEVE-00036n-53 for 34138@debbugs.gnu.org; Sun, 20 Jan 2019 09:55:13 -0500 Original-Received: from rosalinde ([92.73.79.34]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0Lb5GD-1hVakZ3EdN-00kdEs; Sun, 20 Jan 2019 15:55:03 +0100 In-Reply-To: <5C4483B7.1060604@gmx.at> (martin rudalics's message of "Sun, 20 Jan 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iBl/bUZcBjFP+oLyQOjPtmJ6xbu4SDCVweiD2 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:154612 Archived-At: --=-=-= Content-Type: text/plain On Sun, 20 Jan 2019 15:20:39 +0100 martin rudalics wrote: >>> Have you tried running 'doc-view-mode' without loading >>> 'pdf-view-mode'? >> >> Yes, as I noted, I also see this with -Q. > > It seems that 'doc-view-new-window-function' fails in some way. This > time I have to CC Tassilo. Maybe he has a clue. I stepped through that function with Edebug but that failed to reproduce the problem, instead, as expected, the "Welcome to DocView!" message was briefly shown in the buffer and then then image. >> AFAICS display-buffer-split-below-and-attach is only used in the >> defcustom pdf-annot-edit-contents-display-buffer-action, which specified >> the "Display action when showing the edit buffer", so it's irrelevent >> for just displaying the PDF file. Anyway, I modified and instrumented >> the function, but it wasn't called on visiting the file. > > Thanks. > >>>> In addition, in pdf-view-mode this appears in *Message*: >>>> Error during redisplay: (eval (pdf-misc-size-indication)) signaled >>>> (error "Invalid image specification: nil"). >>> >>> This should come from the 'image-display-size' call in >>> 'pdf-view-image-size'. Could you get a backtrace for it? >> >> There is no Lisp backtrace, just the "error during redisplay" message. >> That eval expression is a modeline construct, so I guess this needs to >> be debugged at the C level. I could try to do that but probably need >> guidance. (Ah, I just saw Andreas's post that he could reproduce the >> issue, so hopefully he can debug it.) > > Could you try to insert a backtrace into some buffer instead of the > error call in 'image-display-size'? Thanks for the suggestion; I've attached the output. Steve Berman --=-=-= Content-Type: text/plain Content-Disposition: attachment Content-Transfer-Encoding: quoted-printable Content-Description: image-display-size backtrace backtrace() (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (c= ons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 sli= ce)) (frame-char-height frame))))) (image (image-size image pixels frame)) = (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))) (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((an= d image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (floa= t (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-= char-height frame))))) (image (image-size image pixels frame)) (t (let ((st= andard-output (get-buffer-create "*PDF test*"))) (backtrace))))) (cond ((eq (car spec) 'xwidget) (let ((xwi (xwidget-info (xwidget-at (poi= nt-min))))) (cons (aref xwi 2) (aref xwi 3)))) ((eq (car spec) 'image) (ima= ge-size spec pixels frame)) (t (let ((image (assoc 'image spec)) (slice (as= soc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) = (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ = (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size imag= e pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*")= )) (backtrace))))))) image-display-size(nil t) pdf-view-image-size(t) pdf-misc-size-indication() eval((pdf-misc-size-indication)) redisplay_internal\ \(C\ function\)() backtrace() (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)) (cond ((and image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (c= ons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 sli= ce)) (frame-char-height frame))))) (image (image-size image pixels frame)) = (t (let ((standard-output (get-buffer-create "*PDF test*"))) (backtrace)))) (let ((image (assoc 'image spec)) (slice (assoc 'slice spec))) (cond ((an= d image slice) (if pixels (cons (nth 3 slice) (nth 4 slice)) (cons (/ (floa= t (nth 3 slice)) (frame-char-width frame)) (/ (float (nth 4 slice)) (frame-= char-height frame))))) (image (image-size image pixels frame)) (t (let ((st= andard-output (get-buffer-create "*PDF test*"))) (backtrace))))) (cond ((eq (car spec) 'xwidget) (let ((xwi (xwidget-info (xwidget-at (poi= nt-min))))) (cons (aref xwi 2) (aref xwi 3)))) ((eq (car spec) 'image) (ima= ge-size spec pixels frame)) (t (let ((image (assoc 'image spec)) (slice (as= soc 'slice spec))) (cond ((and image slice) (if pixels (cons (nth 3 slice) = (nth 4 slice)) (cons (/ (float (nth 3 slice)) (frame-char-width frame)) (/ = (float (nth 4 slice)) (frame-char-height frame))))) (image (image-size imag= e pixels frame)) (t (let ((standard-output (get-buffer-create "*PDF test*")= )) (backtrace))))))) image-display-size(nil t) pdf-view-image-size(t) pdf-misc-size-indication() eval((pdf-misc-size-indication)) posn-at-point(1 #) window-in-direction(below #) #f(compiled-function (window) #)(#) walk-window-tree-1(#f(compiled-function (window) #) #<= window 68 on fhs-2.3.pdf> nil) walk-window-tree(#f(compiled-function (window) #) nil = nil nomini) display-buffer-at-bottom(# ((window-height . t) (pr= eserve-size nil . t))) display-buffer(# ((display-buffer--maybe-same-windo= w display-buffer-reuse-window display-buffer--maybe-pop-up-frame display-bu= ffer-at-bottom) (window-height . t) (preserve-size nil . t))) temp-buffer-window-show(# ((display-buffer--maybe-s= ame-window display-buffer-reuse-window display-buffer--maybe-pop-up-frame d= isplay-buffer-at-bottom) (window-height . t) (preserve-size nil . t))) minibuffer-completion-help(34 37) completion--do-completion(34 37) completion--in-region-1(34 37) #f(compiled-function (start end collection predicate) #)(34 37 #f(compiled-function (&rest args2) #) nil) apply(#f(compiled-function (start end collection predicate) #) (34 37 #f(compiled-function (&rest args2) #) nil)) #f(compiled-function (funs global args) #)(nil nil (3= 4 37 #f(compiled-function (&rest args2) #) nil)) completion--in-region(34 37 #f(compiled-function (&rest args2) #) nil) completion-in-region(34 37 #f(compiled-function (&rest args2) #) nil) minibuffer-complete() funcall-interactively(minibuffer-complete) call-interactively(minibuffer-complete nil nil) command-execute(minibuffer-complete) read-from-minibuffer("Switch to buffer (default temp): " nil (keymap (10 = . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap = (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibu= ffer-complete :help "Complete as far as possible") (space menu-item "Comple= te Word" minibuffer-complete-word :help "Complete at most one word") (63 me= nu-item "List Completions" minibuffer-completion-help :help "Display all po= ssible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) = (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . min= ibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (m= inibuf "Minibuf" keymap (previous menu-item "Previous History Item" previou= s-history-element :help "Put previous minibuffer history element in the min= ibuffer") (next menu-item "Next History Item" next-history-element :help "P= ut next minibuffer history element in the minibuffer") (isearch-backward me= nu-item "Isearch History Backward" isearch-backward :help "Incrementally se= arch minibuffer history backward") (isearch-forward menu-item "Isearch Hist= ory Forward" isearch-forward :help "Incrementally search minibuffer history= forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :h= elp "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-rec= ursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit= -minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . fil= e-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous= -history-element) (up . previous-line-or-history-element) (prior . previous= -history-element) (XF86Forward . next-history-element) (down . next-line-or= -history-element) (next . next-history-element) (27 keymap (114 . previous-= matching-history-element) (115 . next-matching-history-element) (112 . prev= ious-history-element) (110 . next-history-element))) nil buffer-name-histor= y "temp" nil) completing-read-default("Switch to buffer (default temp): " internal-comp= lete-buffer nil confirm-after-completion nil buffer-name-history "temp" nil) read-buffer("Switch to buffer: " # confirm-after-completion) read-buffer-to-switch("Switch to buffer: ") byte-code("\10?\205R\0\302 \203\16\0\303\202R\0\304 \305=3D\204\31\0\306\= 202R\0\11\204#\0\307\310!\202R\0\11\311=3D\203B\0\312\313\314\315 \"!\203<\= 0\316\303\211\"\210\306\202R\0\307\310!\202R\0\11\317=3D\203L\0\303\202R\0\= 316\303\211\"\210\306\320\321!\303\2E\207" [switch-to-buffer-obey-display-a= ctions switch-to-buffer-in-dedicated-window window-minibuffer-p nil window-= dedicated-p t force-same-window user-error "Cannot switch buffers in a dedi= cated window" prompt y-or-n-p format "Window is dedicated to %s; undedicate= it" window-buffer set-window-dedicated-p pop read-buffer-to-switch "Switch= to buffer: "] 4) call-interactively(switch-to-buffer nil nil) command-execute(switch-to-buffer) --=-=-=--