From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r112045: * doc-view.el Fix bug#13887. Date: Mon, 18 Mar 2013 09:23:44 -0400 Message-ID: References: <874ng9cfwl.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363613046 2602 80.91.229.3 (18 Mar 2013 13:24:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Mar 2013 13:24:06 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 18 14:24:32 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHa3D-0002AW-M9 for ged-emacs-devel@m.gmane.org; Mon, 18 Mar 2013 14:24:31 +0100 Original-Received: from localhost ([::1]:55976 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHa2q-0006gC-Ks for ged-emacs-devel@m.gmane.org; Mon, 18 Mar 2013 09:24:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHa2a-0006F2-7r for emacs-devel@gnu.org; Mon, 18 Mar 2013 09:23:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHa2T-0004aS-Tu for emacs-devel@gnu.org; Mon, 18 Mar 2013 09:23:52 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:20808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHa2T-0004aF-Pu for emacs-devel@gnu.org; Mon, 18 Mar 2013 09:23:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYZL/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpYZL/2dsb2JhbABEvw4Xc4IeAQEEAVYoCws0EhQYDYhCBsEtjWGDKQOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="5147293" Original-Received: from 69-165-134-75.dsl.teksavvy.com (HELO pastel.home) ([69.165.134.75]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Mar 2013 09:23:43 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id CC369678B2; Mon, 18 Mar 2013 09:23:44 -0400 (EDT) In-Reply-To: <874ng9cfwl.fsf@thinkpad.tsdh.de> (Tassilo Horn's message of "Mon, 18 Mar 2013 08:42:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157927 Archived-At: >>> + ;; We're not already displaying an image, so this is the >>> + ;; initial window showing the document. >>> + (run-with-timer nil nil >>> + (lambda () >>> + ;; In case a conversion is running, the >>> + ;; refresh will happen as defined by >>> + ;; `doc-view-conversion-refresh-interval'. >>> + (unless doc-view-current-converter-processes >>> + (with-selected-window (car winprops) >>> + (doc-view-goto-page 1))))) >> I don't understand the scenario in which this doc-view-goto-page would >> be needed. > This is the case where the document is initially shown in a window. I must admit I do not know what you mean precisely with the above sentence. > My change to `doc-view-insert-image' prevents insertion of image data > if the window isn't shown, Do you mean "if the window is not *live*" or "if the *buffer* isn't shown"? > and here the `doc-view-goto-page' call will do just that. But between the moment you checked window-live-p and the moment you run the above timer, if the buffer ends up displayed, there must have been an operation that ran window-configuration-change-hook. So IIUC this doc-view-goto-page shouldn't be required because the window-configuration-change-hook should have caused an equivalent doc-view-goto-page already. > I've adjusted the comment accordingly. Thanks, Stefan