From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#54038: 29.0.50; doc-view cannot show different pages in different tabs Date: Fri, 18 Feb 2022 10:11:21 +0200 Organization: LINKOV.NET Message-ID: <86wnhslhli.fsf@mail.linkov.net> References: <874k4xrgu5.fsf@gmail.com> <86wnhtjrb4.fsf@mail.linkov.net> <87fsohouaw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7417"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: 54038@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 18 09:14:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nKyPE-0001lu-Cg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Feb 2022 09:14:20 +0100 Original-Received: from localhost ([::1]:33536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nKyP8-00051U-R6 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Feb 2022 03:14:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nKyOw-000518-Rt for bug-gnu-emacs@gnu.org; Fri, 18 Feb 2022 03:14:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59495) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nKyOw-0008KG-Io for bug-gnu-emacs@gnu.org; Fri, 18 Feb 2022 03:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nKyOw-0002Pk-Fa for bug-gnu-emacs@gnu.org; Fri, 18 Feb 2022 03:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Feb 2022 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54038 X-GNU-PR-Package: emacs Original-Received: via spool by 54038-submit@debbugs.gnu.org id=B54038.16451719839205 (code B ref 54038); Fri, 18 Feb 2022 08:14:02 +0000 Original-Received: (at 54038) by debbugs.gnu.org; 18 Feb 2022 08:13:03 +0000 Original-Received: from localhost ([127.0.0.1]:53392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKyNz-0002OP-4q for submit@debbugs.gnu.org; Fri, 18 Feb 2022 03:13:03 -0500 Original-Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nKyNx-0002Na-7L for 54038@debbugs.gnu.org; Fri, 18 Feb 2022 03:13:02 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 43E17FF80B; Fri, 18 Feb 2022 08:12:52 +0000 (UTC) In-Reply-To: <87fsohouaw.fsf@gmail.com> (Visuwesh's message of "Fri, 18 Feb 2022 06:36:18 +0530") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227145 Archived-At: > But, how can I get my desired behaviour tho? If I create a new tab > using C-x t 2, it breaks doc-view in a different way. I am finding it > hard to describe it in text, so I would appreciate it if you can try it > out for yourself: essentially, C-x t 2, and then try changing pages. > Doc-view doesn't show the correct image but the page number in the > modeline changes. Please try this patch with 'C-x t 2' (whereas 'C-x t n' will be fixed later). The problem is that when 'image-mode-winprops' does window cleanup, it doesn't take into account windows saved in tabs. diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 5bee155460..c127df12ae 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -179,7 +179,7 @@ image-mode-reapply-winprops ;; Beware: this call to image-mode-winprops can't be optimized away, ;; because it not only gets the winprops data but sets it up if needed ;; (e.g. it's used by doc-view to display the image in a new window). - (let* ((winprops (image-mode-winprops nil t)) + (let* ((winprops (image-mode-winprops nil nil)) (hscroll (image-mode-window-get 'hscroll winprops)) (vscroll (image-mode-window-get 'vscroll winprops))) (when (image-get-display-property) ;Only do it if we display an image!