GNU bug report logs - #12876
24.3.50; DocView problem with cached files

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Stephen Berman <stephen.berman@HIDDEN>; dated Tue, 13 Nov 2012 11:14:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Disconnected #13482 from all other report(s). Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Merged 12876 13482. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 15 Nov 2012 07:58:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 15 02:58:02 2012
Received: from localhost ([127.0.0.1]:43739 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYuKo-0005Oi-21
	for submit <at> debbugs.gnu.org; Thu, 15 Nov 2012 02:58:02 -0500
Received: from deliver.uni-koblenz.de ([141.26.64.15]:47779)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYuKk-0005OJ-Rk
	for 12876 <at> debbugs.gnu.org; Thu, 15 Nov 2012 02:57:59 -0500
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id C796FD2227;
	Thu, 15 Nov 2012 08:57:18 +0100 (CET)
X-Virus-Scanned: amavisd-new at uni-koblenz.de
Received: from deliver.uni-koblenz.de ([127.0.0.1])
	by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id fm43Dht6jsdB; Thu, 15 Nov 2012 08:57:18 +0100 (CET)
X-CHKRCPT: Envelopesender noch tsdh@HIDDEN
Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 3F359D2224;
	Thu, 15 Nov 2012 08:57:18 +0100 (CET)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN>
	<jwv7gpny1no.fsf-monnier+bug#12876@HIDDEN>
	<87r4nv490l.fsf@HIDDEN>
Date: Thu, 15 Nov 2012 08:57:17 +0100
In-Reply-To: <87r4nv490l.fsf@HIDDEN> (Tassilo Horn's message of
	"Thu, 15 Nov 2012 08:31:38 +0100")
Message-ID: <87ip9747tu.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: Stephen Berman <stephen.berman@HIDDEN>, 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -2.1 (--)

Tassilo Horn <tsdh@HIDDEN> writes:

>> Actually, no, the winprops stuff should also work when the buffer is
>> not displayed anywhere.
>>
>> But I can't seem to reproduce the OP's problem.  I tried just "emacs
>> -Q ~/tmp/foo.pdf; emacs -Q ~/tmp/foo.pdf" and it worked fine.
>
> Not here running "eliz@HIDDEN", that
> is revno 110896.  I have the same symptoms as Stephen, that is, "P/17"
> in mode-line and `doc-view-next-page' and friends error.
>
> [...]
>
> I'll update to revno 110904 to see if it works and report back.

Done so, and the problem still exists.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 15 Nov 2012 07:32:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 15 02:32:27 2012
Received: from localhost ([127.0.0.1]:43716 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYtw1-0004nH-Ri
	for submit <at> debbugs.gnu.org; Thu, 15 Nov 2012 02:32:27 -0500
Received: from deliver.uni-koblenz.de ([141.26.64.15]:45204)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYtvx-0004n7-Iv
	for 12876 <at> debbugs.gnu.org; Thu, 15 Nov 2012 02:32:23 -0500
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id D99ADD23FC;
	Thu, 15 Nov 2012 08:31:40 +0100 (CET)
X-Virus-Scanned: amavisd-new at uni-koblenz.de
Received: from deliver.uni-koblenz.de ([127.0.0.1])
	by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id OstPMwDhNkMy; Thu, 15 Nov 2012 08:31:40 +0100 (CET)
X-CHKRCPT: Envelopesender noch tsdh@HIDDEN
Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 3432AD23FB;
	Thu, 15 Nov 2012 08:31:40 +0100 (CET)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN>
	<jwv7gpny1no.fsf-monnier+bug#12876@HIDDEN>
Date: Thu, 15 Nov 2012 08:31:38 +0100
In-Reply-To: <jwv7gpny1no.fsf-monnier+bug#12876@HIDDEN> (Stefan Monnier's
	message of "Wed, 14 Nov 2012 22:47:39 -0500")
Message-ID: <87r4nv490l.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: Stephen Berman <stephen.berman@HIDDEN>, 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -3.5 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>> the following patch fixes the issue for me, but I'm not sure if it's the
>> right thing to do.  Stefan, could you please check?
>
> [ BTW, using a "diff -b" is very helpful for such patches which
>   reindent a lot of code. ]

Right, I'll do the next time.

>> Basically, the difference between finding a not yet converted doc and
>> a doc that's already cached is that in the former case
>> `doc-view-goto-page' runs with the selected window displaying the
>> doc's buffer.  AFAIKS, that's a must for the image-mode winprops
>> stuff to work, so in the latter case, the patch defers running
>
> Actually, no, the winprops stuff should also work when the buffer is
> not displayed anywhere.
>
> But I can't seem to reproduce the OP's problem.
> I tried just "emacs -Q ~/tmp/foo.pdf; emacs -Q ~/tmp/foo.pdf" and it
> worked fine.

Not here running "eliz@HIDDEN", that is
revno 110896.  I have the same symptoms as Stephen, that is, "P/17" in
mode-line and `doc-view-next-page' and friends error.

There are some newer commits since then, but none in
lisp/emacs-lisp/gv.el.

> I have the strange impression that the problem was actually not in
> doc-view.el or image-mode.el (neither of which was modified between
> 110689 and 110748).  I instead suspect it was a temporary bug in
> gv.el.  It's been fixed since, but the fix will only become effective
> after recompiling the victim.

I run Gentoo GNU/Linux, so everytime I reinstall the emacs-vcs package,
it'll do a complete vanialla install bootstrapping and recompiling
everything.

I'll update to revno 110904 to see if it works and report back.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 15 Nov 2012 03:48:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 22:48:22 2012
Received: from localhost ([127.0.0.1]:43346 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYqRC-0007tp-0A
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2012 22:48:22 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:15714)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <monnier@HIDDEN>) id 1TYqR9-0007th-Cd
	for 12876 <at> debbugs.gnu.org; Wed, 14 Nov 2012 22:48:19 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09sr+ZY/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmQRAOIQppxgViDB4E4Gg
X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="207652125"
Received: from 108-175-230-88.dsl.teksavvy.com (HELO pastel.home)
	([108.175.230.88])
	by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
	14 Nov 2012 22:47:40 -0500
Received: by pastel.home (Postfix, from userid 20848)
	id C9E22594C8; Wed, 14 Nov 2012 22:47:39 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
Message-ID: <jwv7gpny1no.fsf-monnier+bug#12876@HIDDEN>
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN>
Date: Wed, 14 Nov 2012 22:47:39 -0500
In-Reply-To: <87k3tpi6wz.fsf@HIDDEN> (Tassilo Horn's message of
	"Tue, 13 Nov 2012 21:28:44 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: Stephen Berman <stephen.berman@HIDDEN>, 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: 0.8 (/)

> the following patch fixes the issue for me, but I'm not sure if it's the
> right thing to do.  Stefan, could you please check?

[ BTW, using a "diff -b" is very helpful for such patches which
  reindent a lot of code. ]

> Basically, the difference between finding a not yet converted doc and a
> doc that's already cached is that in the former case
> `doc-view-goto-page' runs with the selected window displaying the doc's
> buffer.  AFAIKS, that's a must for the image-mode winprops stuff to
> work, so in the latter case, the patch defers running

Actually, no, the winprops stuff should also work when the buffer is not
displayed anywhere.

But I can't seem to reproduce the OP's problem.
I tried just "emacs -Q ~/tmp/foo.pdf; emacs -Q ~/tmp/foo.pdf" and it
worked fine.

I have the strange impression that the problem was actually not in
doc-view.el or image-mode.el (neither of which was modified between 110689
and 110748).  I instead suspect it was a temporary bug in gv.el.
It's been fixed since, but the fix will only become effective after
recompiling the victim.

IOW, can you recompile image-mode.el and doc-view.el (or do a full
bootstrap) and then tell us whether you still see the problem (and if
so, try to provide a more detailed recipe)?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 14 Nov 2012 10:46:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 05:46:35 2012
Received: from localhost ([127.0.0.1]:40824 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYaUN-00056H-D0
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:46:35 -0500
Received: from deliver.uni-koblenz.de ([141.26.64.15]:40203)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYaUL-00056A-Aw
	for 12876 <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:46:34 -0500
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 43AB7D22EE;
	Wed, 14 Nov 2012 11:45:58 +0100 (CET)
X-Virus-Scanned: amavisd-new at uni-koblenz.de
Received: from deliver.uni-koblenz.de ([127.0.0.1])
	by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id b3Y6lkbE1Oj5; Wed, 14 Nov 2012 11:45:57 +0100 (CET)
X-CHKRCPT: Envelopesender noch tsdh@HIDDEN
Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by deliver.uni-koblenz.de (Postfix) with ESMTPSA id C0DC3D22EA;
	Wed, 14 Nov 2012 11:45:57 +0100 (CET)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN> <87ehjxfbwr.fsf@HIDDEN>
	<87ip988poe.fsf@HIDDEN> <87fw4ciiq9.fsf@HIDDEN>
Date: Wed, 14 Nov 2012 11:45:51 +0100
In-Reply-To: <87fw4ciiq9.fsf@HIDDEN> (Stephen Berman's message of
	"Wed, 14 Nov 2012 11:25:50 +0100")
Message-ID: <87a9uk8nts.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.8 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

>> It'll also work, but chances increase that the page-setting is
>> deferred another fraction again.  I tried to set the value so that
>> it's not inconvenient but at the same time shouldn't need to delay
>> again on slower systems.
>
> How about making it customizable?

Surely that could be done.  But I have no idea about a good description
not involving technical details that users shouldn't have to care about.
So maybe using a shorter delay is ok.  After all, using doc-view is
computational intensive anyhow (at least the conversion with gs and
friends)...

Anyway, before going any further, I'd like to wait for Stefan telling us
if that's the right approach altogether.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 14 Nov 2012 10:26:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 05:26:30 2012
Received: from localhost ([127.0.0.1]:40781 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYaAw-0004dF-I3
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:26:30 -0500
Received: from mailout-de.gmx.net ([213.165.64.22]:52074)
	by debbugs.gnu.org with smtp (Exim 4.72)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYaAt-0004d7-Uh
	for 12876 <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:26:29 -0500
Received: (qmail invoked by alias); 14 Nov 2012 10:25:52 -0000
Received: from i59F5607D.versanet.de (EHLO rosalinde.fritz.box) [89.245.96.125]
	by mail.gmx.net (mp040) with SMTP; 14 Nov 2012 11:25:52 +0100
X-Authenticated: #20778731
X-Provags-ID: V01U2FsdGVkX18ApboFT8kANamLjCwBwkz07R+miNfi0XaGcitTlV
	pLxkgWyeeIVtwW
From: Stephen Berman <stephen.berman@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN> <87ehjxfbwr.fsf@HIDDEN>
	<87ip988poe.fsf@HIDDEN>
Date: Wed, 14 Nov 2012 11:25:50 +0100
In-Reply-To: <87ip988poe.fsf@HIDDEN> (Tassilo Horn's message of
	"Wed, 14 Nov 2012 11:05:53 +0100")
Message-ID: <87fw4ciiq9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.7 (/)

On Wed, 14 Nov 2012 11:05:53 +0100 Tassilo Horn <tsdh@HIDDEN> wrote:

> Stephen Berman <stephen.berman@HIDDEN> writes:
>
>>> the following patch fixes the issue for me, but I'm not sure if it's
>>> the right thing to do.  Stefan, could you please check?
>>>
>>> Basically, the difference between finding a not yet converted doc and
>>> a doc that's already cached is that in the former case
>>> `doc-view-goto-page' runs with the selected window displaying the
>>> doc's buffer.  AFAIKS, that's a must for the image-mode winprops
>>> stuff to work, so in the latter case, the patch defers running
>>> `doc-view-goto-page' a bit into the future when the window showing
>>> the doc buffer is hopefully there.
>>
>> The patch fixes the problem for me, too; thanks.  However, the delay
>> of 0.1 seconds results in the unconverted file being noticeable before
>> the image is displayed.
>
> Yes, but that's no big deal IMHO.  You'll see the raw source for a short
> time also when the doc isn't cached already.
>
>> I tried it with a 0.01 second delay and this makes the image appear
>> practically instantly to me, i.e., I didn't see the unconverted
>> source, and the paging still worked.  I don't know if this short a
>> delay is always guaranteed to succeed.
>
> It'll also work, but chances increase that the page-setting is deferred
> another fraction again.  I tried to set the value so that it's not
> inconvenient but at the same time shouldn't need to delay again on
> slower systems.

How about making it customizable?

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 14 Nov 2012 10:06:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 14 05:06:40 2012
Received: from localhost ([127.0.0.1]:40762 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYZrk-0004CK-B4
	for submit <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:06:40 -0500
Received: from deliver.uni-koblenz.de ([141.26.64.15]:33926)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYZrh-0004CC-IO
	for 12876 <at> debbugs.gnu.org; Wed, 14 Nov 2012 05:06:39 -0500
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id CA0E5D2237;
	Wed, 14 Nov 2012 11:06:00 +0100 (CET)
X-Virus-Scanned: amavisd-new at uni-koblenz.de
Received: from deliver.uni-koblenz.de ([127.0.0.1])
	by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id X81Gvb1LcSKN; Wed, 14 Nov 2012 11:06:00 +0100 (CET)
X-CHKRCPT: Envelopesender noch tsdh@HIDDEN
Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 22EF3D2232;
	Wed, 14 Nov 2012 11:05:59 +0100 (CET)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN> <87ehjxfbwr.fsf@HIDDEN>
Date: Wed, 14 Nov 2012 11:05:53 +0100
In-Reply-To: <87ehjxfbwr.fsf@HIDDEN> (Stephen Berman's message of
	"Tue, 13 Nov 2012 22:09:08 +0100")
Message-ID: <87ip988poe.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.8 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

>> the following patch fixes the issue for me, but I'm not sure if it's
>> the right thing to do.  Stefan, could you please check?
>>
>> Basically, the difference between finding a not yet converted doc and
>> a doc that's already cached is that in the former case
>> `doc-view-goto-page' runs with the selected window displaying the
>> doc's buffer.  AFAIKS, that's a must for the image-mode winprops
>> stuff to work, so in the latter case, the patch defers running
>> `doc-view-goto-page' a bit into the future when the window showing
>> the doc buffer is hopefully there.
>
> The patch fixes the problem for me, too; thanks.  However, the delay
> of 0.1 seconds results in the unconverted file being noticeable before
> the image is displayed.

Yes, but that's no big deal IMHO.  You'll see the raw source for a short
time also when the doc isn't cached already.

> I tried it with a 0.01 second delay and this makes the image appear
> practically instantly to me, i.e., I didn't see the unconverted
> source, and the paging still worked.  I don't know if this short a
> delay is always guaranteed to succeed.

It'll also work, but chances increase that the page-setting is deferred
another fraction again.  I tried to set the value so that it's not
inconvenient but at the same time shouldn't need to delay again on
slower systems.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 13 Nov 2012 21:09:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 13 16:09:47 2012
Received: from localhost ([127.0.0.1]:39462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYNjv-0002HO-3V
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 16:09:47 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:33519)
	by debbugs.gnu.org with smtp (Exim 4.72)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYNjs-0002HH-Iy
	for 12876 <at> debbugs.gnu.org; Tue, 13 Nov 2012 16:09:45 -0500
Received: (qmail invoked by alias); 13 Nov 2012 21:09:10 -0000
Received: from i59F54C6E.versanet.de (EHLO rosalinde.fritz.box) [89.245.76.110]
	by mail.gmx.net (mp027) with SMTP; 13 Nov 2012 22:09:10 +0100
X-Authenticated: #20778731
X-Provags-ID: V01U2FsdGVkX1+KVrEUzSuKfrngeZDnLNvVOkMRscAca//aGhmmQV
	HW1QtnPrNhncqD
From: Stephen Berman <stephen.berman@HIDDEN>
To: Tassilo Horn <tsdh@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
	<87k3tpi6wz.fsf@HIDDEN>
Date: Tue, 13 Nov 2012 22:09:08 +0100
In-Reply-To: <87k3tpi6wz.fsf@HIDDEN> (Tassilo Horn's message of
	"Tue, 13 Nov 2012 21:28:44 +0100")
Message-ID: <87ehjxfbwr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Y-GMX-Trusted: 0
X-Spam-Score: 0.6 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.2 (/)

On Tue, 13 Nov 2012 21:28:44 +0100 Tassilo Horn <tsdh@HIDDEN> wrote:

> Hi Stephen & Stefan,
>
> the following patch fixes the issue for me, but I'm not sure if it's the
> right thing to do.  Stefan, could you please check?
>
> Basically, the difference between finding a not yet converted doc and a
> doc that's already cached is that in the former case
> `doc-view-goto-page' runs with the selected window displaying the doc's
> buffer.  AFAIKS, that's a must for the image-mode winprops stuff to
> work, so in the latter case, the patch defers running
> `doc-view-goto-page' a bit into the future when the window showing the
> doc buffer is hopefully there.

The patch fixes the problem for me, too; thanks.  However, the delay of
0.1 seconds results in the unconverted file being noticeable before the
image is displayed.  I tried it with a 0.01 second delay and this makes
the image appear practically instantly to me, i.e., I didn't see the
unconverted source, and the paging still worked.  I don't know if this
short a delay is always guaranteed to succeed.

Steve Berman




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 13 Nov 2012 20:29:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 13 15:29:21 2012
Received: from localhost ([127.0.0.1]:39353 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYN6m-0000T1-UQ
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 15:29:21 -0500
Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52524)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYN6k-0000St-B2
	for 12876 <at> debbugs.gnu.org; Tue, 13 Nov 2012 15:29:19 -0500
Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46])
	by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 2E3AF20847;
	Tue, 13 Nov 2012 15:28:46 -0500 (EST)
Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160])
	by compute6.internal (MEProxy); Tue, 13 Nov 2012 15:28:46 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	messagingengine.com; h=from:to:cc:subject:references:date
	:in-reply-to:message-id:mime-version:content-type; s=smtpout;
	bh=wGvt7LM2dYD3BsGhIRrypHl5xuM=; b=H+ljSQkLKhkpr6URZHMSWR/I2fgX
	l1s6iRg9Nc8bPRO52LPTa5eOYU+Yi2GUfISlQG8aCz/rreru+obYDf+WpgeqLbOt
	7iHln6v+zHZetwS/LQ9EZnVObcZj1OdD1PlvquVT8YV94YMS0mrrm//Q/O4Er1Ko
	VNLz5fkx+XJnijU=
X-Sasl-enc: XrsGUXf+wQrRhjm4K1GtwKTODva2MAijaVPRBZ/Iv+ry 1352838525
Received: from thinkpad.tsdh.de (unknown [91.67.10.84])
	by mail.messagingengine.com (Postfix) with ESMTPA id 7A2508E04CE;
	Tue, 13 Nov 2012 15:28:45 -0500 (EST)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
Date: Tue, 13 Nov 2012 21:28:44 +0100
In-Reply-To: <87ip99g3it.fsf@HIDDEN> (Stephen Berman's message of
	"Tue, 13 Nov 2012 12:12:42 +0100")
Message-ID: <87k3tpi6wz.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -1.9 (-)

Hi Stephen & Stefan,

the following patch fixes the issue for me, but I'm not sure if it's the
right thing to do.  Stefan, could you please check?

Basically, the difference between finding a not yet converted doc and a
doc that's already cached is that in the former case
`doc-view-goto-page' runs with the selected window displaying the doc's
buffer.  AFAIKS, that's a must for the image-mode winprops stuff to
work, so in the latter case, the patch defers running
`doc-view-goto-page' a bit into the future when the window showing the
doc buffer is hopefully there.

--8<---------------cut here---------------start------------->8---
=== modified file 'lisp/doc-view.el'
--- lisp/doc-view.el	2012-09-28 10:05:46 +0000
+++ lisp/doc-view.el	2012-11-13 20:25:53 +0000
@@ -419,57 +419,63 @@
 (defun doc-view-goto-page (page)
   "View the page given by PAGE."
   (interactive "nPage: ")
-  (let ((len (doc-view-last-page-number))
-	(hscroll (window-hscroll)))
-    (if (< page 1)
-	(setq page 1)
-      (when (and (> page len)
-                 ;; As long as the converter is running, we don't know
-                 ;; how many pages will be available.
-                 (null doc-view-current-converter-processes))
-	(setq page len)))
-    (setf (doc-view-current-page) page
-	  (doc-view-current-info)
-	  (concat
-	   (propertize
-	    (format "Page %d of %d." page len) 'face 'bold)
-	   ;; Tell user if converting isn't finished yet
-	   (if doc-view-current-converter-processes
-	       " (still converting...)\n"
-	     "\n")
-	   ;; Display context infos if this page matches the last search
-	   (when (and doc-view-current-search-matches
-		      (assq page doc-view-current-search-matches))
-	     (concat (propertize "Search matches:\n" 'face 'bold)
-		     (let ((contexts ""))
-		       (dolist (m (cdr (assq page
-					     doc-view-current-search-matches)))
-			 (setq contexts (concat contexts "  - \"" m "\"\n")))
-		       contexts)))))
-    ;; Update the buffer
-    ;; We used to find the file name from doc-view-current-files but
-    ;; that's not right if the pages are not generated sequentially
-    ;; or if the page isn't in doc-view-current-files yet.
-    (let ((file (expand-file-name (format "page-%d.png" page)
-                                  (doc-view-current-cache-dir))))
-      (doc-view-insert-image file :pointer 'arrow)
-      (set-window-hscroll (selected-window) hscroll)
-      (when (and (not (file-exists-p file))
-                 doc-view-current-converter-processes)
-        ;; The PNG file hasn't been generated yet.
-        (doc-view-pdf->png-1 doc-view-buffer-file-name file page
-                             (let ((win (selected-window)))
-                               (lambda ()
-                                 (and (eq (current-buffer) (window-buffer win))
-                                      ;; If we changed page in the mean
-                                      ;; time, don't mess things up.
-                                      (eq (doc-view-current-page win) page)
-                                      ;; Make sure we don't infloop.
-                                      (file-readable-p file)
-                                      (with-selected-window win
-							    (doc-view-goto-page page))))))))
-    (overlay-put (doc-view-current-overlay)
-                 'help-echo (doc-view-current-info))))
+  (if (null (get-buffer-window))
+      ;; The document buffer isn't displayed in any window yet.  This
+      ;; happens when using cached PNG files.  The buffer will be
+      ;; displayed after `doc-view-mode' has returned, so try again a
+      ;; bit later.
+      (run-with-timer 0.1 nil #'doc-view-goto-page page)
+    (let ((len (doc-view-last-page-number))
+	  (hscroll (window-hscroll)))
+      (if (< page 1)
+	  (setq page 1)
+	(when (and (> page len)
+		   ;; As long as the converter is running, we don't know
+		   ;; how many pages will be available.
+		   (null doc-view-current-converter-processes))
+	  (setq page len)))
+      (setf (doc-view-current-page) page
+	    (doc-view-current-info)
+	    (concat
+	     (propertize
+	      (format "Page %d of %d." page len) 'face 'bold)
+	     ;; Tell user if converting isn't finished yet
+	     (if doc-view-current-converter-processes
+		 " (still converting...)\n"
+	       "\n")
+	     ;; Display context infos if this page matches the last search
+	     (when (and doc-view-current-search-matches
+			(assq page doc-view-current-search-matches))
+	       (concat (propertize "Search matches:\n" 'face 'bold)
+		       (let ((contexts ""))
+			 (dolist (m (cdr (assq page
+					       doc-view-current-search-matches)))
+			   (setq contexts (concat contexts "  - \"" m "\"\n")))
+			 contexts)))))
+      ;; Update the buffer
+      ;; We used to find the file name from doc-view-current-files but
+      ;; that's not right if the pages are not generated sequentially
+      ;; or if the page isn't in doc-view-current-files yet.
+      (let ((file (expand-file-name (format "page-%d.png" page)
+				    (doc-view-current-cache-dir))))
+	(doc-view-insert-image file :pointer 'arrow)
+	(set-window-hscroll (selected-window) hscroll)
+	(when (and (not (file-exists-p file))
+		   doc-view-current-converter-processes)
+	  ;; The PNG file hasn't been generated yet.
+	  (doc-view-pdf->png-1 doc-view-buffer-file-name file page
+			       (let ((win (selected-window)))
+				 (lambda ()
+				   (and (eq (current-buffer) (window-buffer win))
+					;; If we changed page in the mean
+					;; time, don't mess things up.
+					(eq (doc-view-current-page win) page)
+					;; Make sure we don't infloop.
+					(file-readable-p file)
+					(with-selected-window win
+					  (doc-view-goto-page page))))))))
+      (overlay-put (doc-view-current-overlay)
+		   'help-echo (doc-view-current-info)))))
 
 (defun doc-view-next-page (&optional arg)
   "Browse ARG pages forward."

--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at 12876 <at> debbugs.gnu.org:


Received: (at 12876) by debbugs.gnu.org; 13 Nov 2012 13:12:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 13 08:12:37 2012
Received: from localhost ([127.0.0.1]:37910 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYGI8-0005Lh-E5
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 08:12:37 -0500
Received: from deliver.uni-koblenz.de ([141.26.64.15]:34930)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tsdh@HIDDEN>) id 1TYGI5-0005LY-SN
	for 12876 <at> debbugs.gnu.org; Tue, 13 Nov 2012 08:12:35 -0500
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 64B87D2464;
	Tue, 13 Nov 2012 14:12:03 +0100 (CET)
X-Virus-Scanned: amavisd-new at uni-koblenz.de
Received: from deliver.uni-koblenz.de ([127.0.0.1])
	by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new,
	port 10024)
	with ESMTP id J_-CPG305HLd; Tue, 13 Nov 2012 14:12:02 +0100 (CET)
X-CHKRCPT: Envelopesender noch tsdh@HIDDEN
Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(No client certificate requested)
	by deliver.uni-koblenz.de (Postfix) with ESMTPSA id DDD60D2460;
	Tue, 13 Nov 2012 14:12:02 +0100 (CET)
From: Tassilo Horn <tsdh@HIDDEN>
To: Stephen Berman <stephen.berman@HIDDEN>
Subject: Re: bug#12876: 24.3.50; DocView problem with cached files
References: <87ip99g3it.fsf@HIDDEN>
Date: Tue, 13 Nov 2012 14:12:00 +0100
In-Reply-To: <87ip99g3it.fsf@HIDDEN> (Stephen Berman's message of
	"Tue, 13 Nov 2012 12:12:42 +0100")
Message-ID: <87pq3h1wbj.fsf@HIDDEN>
User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.8 (/)
X-Debbugs-Envelope-To: 12876
Cc: 12876 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -0.8 (/)

Stephen Berman <stephen.berman@HIDDEN> writes:

> When I revisit a PDF file that DocView has cached (also when starting
> with -Q, with the cache /tmp/docview1000), trying to scroll past the
> bottom or top of the page fails with the error
> "doc-view-scroll-up-or-next-page: Wrong type argument:
> number-or-marker-p, nil" or "doc-view-scroll-down-or-previous-page:
> Wrong type argument: number-or-marker-p, nil" and in either case also
> with "Error during redisplay: (eval (number-to-string
> (doc-view-current-page))) signaled (wrong-type-argument numberp nil)".
> In addition, the page number indication in the mode line looks odd:
> e.g. for a one page document it shows "P/1", for a five page document
> it shows "P/5" (only the first page is displayed).

I can confirm the issue.  The problem is that (doc-view-current-page)
and returns nil, although that's setf-ed in `doc-view-initiate-display'.
But I think at this time, the window going to hold the images isn't
there already.

As a workaround, do `M-g M-g 1 RET'.  I'll look into this issue later
today.

Bye,
Tassilo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Nov 2012 11:13:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 13 06:13:47 2012
Received: from localhost ([127.0.0.1]:37614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TYER6-0001hj-0b
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 06:13:47 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43510)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYER0-0001hY-IP
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 06:13:42 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYEQU-0004Js-81
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 06:13:09 -0500
Received: from lists.gnu.org ([208.118.235.17]:44050)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYEQU-0004Jo-4k
	for submit <at> debbugs.gnu.org; Tue, 13 Nov 2012 06:13:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42782)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYEQQ-0007wP-Up
	for bug-gnu-emacs@HIDDEN; Tue, 13 Nov 2012 06:13:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYEQN-0004IM-SB
	for bug-gnu-emacs@HIDDEN; Tue, 13 Nov 2012 06:13:02 -0500
Received: from mailout-de.gmx.net ([213.165.64.23]:36091)
	by eggs.gnu.org with smtp (Exim 4.71)
	(envelope-from <stephen.berman@HIDDEN>) id 1TYEQN-0004He-Ix
	for bug-gnu-emacs@HIDDEN; Tue, 13 Nov 2012 06:12:59 -0500
Received: (qmail invoked by alias); 13 Nov 2012 11:12:45 -0000
Received: from i59F54C6E.versanet.de (EHLO rosalinde.fritz.box) [89.245.76.110]
	by mail.gmx.net (mp033) with SMTP; 13 Nov 2012 12:12:45 +0100
X-Authenticated: #20778731
X-Provags-ID: V01U2FsdGVkX19aSiMAsLpaVsybAqvQrdqcZIW4mWf3XyCx/6VFxD
	fINlQNEckS3K6g
From: Stephen Berman <stephen.berman@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; DocView problem with cached files
Date: Tue, 13 Nov 2012 12:12:42 +0100
Message-ID: <87ip99g3it.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Y-GMX-Trusted: 0
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 208.118.235.17
X-Spam-Score: -4.2 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -4.2 (----)

When I revisit a PDF file that DocView has cached (also when starting
with -Q, with the cache /tmp/docview1000), trying to scroll past the
bottom or top of the page fails with the error
"doc-view-scroll-up-or-next-page: Wrong type argument:
number-or-marker-p, nil" or "doc-view-scroll-down-or-previous-page:
Wrong type argument: number-or-marker-p, nil" and in either case also
with "Error during redisplay: (eval (number-to-string
(doc-view-current-page))) signaled (wrong-type-argument numberp nil)".
In addition, the page number indication in the mode line looks odd:
e.g. for a one page document it shows "P/1", for a five page document it
shows "P/5" (only the first page is displayed).

This problem vanishes if I type `C-c C-c' to view the PDF source and
then type it again to redisplay the image: now scrolling works and the
mode line displays "P1/1" or "P1/5".  If I kill the buffer and revisit
the cached file, the problem reoccurs.  Instead of `C-c C-c', typing `W'
or `H' also redisplays the image, and now scrolling works but the size
is unaltered; repeating `W' or `H' correctly displays the changed size.
Finally, if I delete the cache and then revisit the file, there is no
problem (but there is as soon as I revisit a cached file).

The problem does not seem to happen with large PDF that have many pages;
maybe these are not cached.  It also does not happen with PS files, but
those are initially visited in ps-mode and I have to type `C-c C-c' to
view the image, so this may circumvent the problem I see with PDF files
(I currently cannot view ODF or DOCX files with DocView).

I think this problem started some time between trunk revisions 110689
and 110748 (it happened with my build from the latter but not with my
build from the former revision); I haven't had time to bisect.  It also
happens with the emacs-24 branch, revno 110854; it does not happen with
the openSUSE build of 24.2 from 2012-10-10.


In GNU Emacs 24.3.50.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4)
 of 2012-11-12 on rosalinde
Bzr revision: 110874 monnier@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11203000
System Description:	openSUSE 12.2 (x86_64)

Configured using:
 `configure '--without-toolkit-scroll-bars' 'CFLAGS=-g3 -O0''

Recent messages:
Error during redisplay: (eval (number-to-string (doc-view-current-page))) signaled (wrong-type-argument numberp nil) [7 times]
DocView: using cached files!
Type C-c C-c to toggle between editing or viewing the document.
Error during redisplay: (eval (number-to-string (doc-view-current-page))) signaled (wrong-type-argument numberp nil)
Quit
Opening nntp server on news.gmane.org...
gnutls.c: [1] Note that the security level of the Diffie-Hellman key exchange has been lowered to 256 bits and this may allow decryption of the session data




Acknowledgement sent to Stephen Berman <stephen.berman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#12876; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.