GNU bug report logs - #4896
DocView: Continuous mode

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; Severity: wishlist; Reported by: Juri Linkov <juri@HIDDEN>; dated Tue, 10 Nov 2009 08:25:05 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

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


Received: (at 4896) by debbugs.gnu.org; 4 Feb 2010 22:35:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 04 17:35:57 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NdAIn-0001hg-BK
	for submit <at> debbugs.gnu.org; Thu, 04 Feb 2010 17:35:57 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1NdAIY-0001hZ-Vh
	for 4896@HIDDEN; Thu, 04 Feb 2010 17:35:55 -0500
Received: from ceviche.home (faina.iro.umontreal.ca [132.204.26.177])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o14MZZgD004249; 
	Thu, 4 Feb 2010 17:35:36 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id C4070B4270; Thu,  4 Feb 2010 17:35:31 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Message-ID: <jwv7hqsr5oo.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
	<87k4uvyhia.fsf@HIDDEN>
	<jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN>
	<87ljf93l75.fsf@HIDDEN>
	<jwvaavproqk.fsf-monnier+emacsbugreports@HIDDEN>
	<87vdedhrvz.fsf@HIDDEN>
Date: Thu, 04 Feb 2010 17:35:31 -0500
In-Reply-To: <87vdedhrvz.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	04 Feb 2010 21:45:04 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3463=0
X-Spam-Score: -1.8 (-)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.8 (-)

> Maybe `image-mode' should have the property mode-class=special as well?

Yes.  As a rule, most things that apply to image-mode also apply to
doc-view-mode and vice versa.  For this reason, we should try and
increase the sharing between these two modes.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 4 Feb 2010 19:56:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 04 14:56:49 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nd7om-000057-O4
	for submit <at> debbugs.gnu.org; Thu, 04 Feb 2010 14:56:48 -0500
Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1Nd7oW-0008WR-Es
	for 4896@HIDDEN; Thu, 04 Feb 2010 14:56:44 -0500
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.52.53.cable.starman.ee [82.131.52.53])
	by mx2.starman.ee (Postfix) with ESMTP id 630F23F4084;
	Thu,  4 Feb 2010 21:56:21 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
	<87k4uvyhia.fsf@HIDDEN>
	<jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN>
	<87ljf93l75.fsf@HIDDEN>
	<jwvaavproqk.fsf-monnier+emacsbugreports@HIDDEN>
Date: Thu, 04 Feb 2010 21:45:04 +0200
In-Reply-To: <jwvaavproqk.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Thu, 04 Feb 2010 10:43:11 -0500")
Message-ID: <87vdedhrvz.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.9 (--)

>>>> mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
>>>> document is visited as text because in this case the major mode is not
>>>> doc-view-mode.
>>> Fair enough, go for it,
>> Do you mean putting mode-class=special on `doc-view-mode'?
>
> Yes.

Actually the same problem exists also for `image-mode'.  Visiting an image
from an archive activates `view-mode'.  This causes incorrect image browsing
that uses view-mode scrolling commands instead of image scrolling commands.

Maybe `image-mode' should have the property mode-class=special as well?

=== modified file 'lisp/image-mode.el'
--- lisp/image-mode.el	2010-01-13 08:35:10 +0000
+++ lisp/image-mode.el	2010-02-04 19:44:42 +0000
@@ -317,6 +317,8 @@ (defvar image-minor-mode-map
 
 (defvar bookmark-make-record-function)
 
+(put 'image-mode 'mode-class 'special)
+
 ;;;###autoload
 (defun image-mode ()
   "Major mode for image files.

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 4 Feb 2010 15:43:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Feb 04 10:43:32 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nd3rS-0005fT-Dc
	for submit <at> debbugs.gnu.org; Thu, 04 Feb 2010 10:43:32 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1Nd3rR-0005fN-06
	for 4896@HIDDEN; Thu, 04 Feb 2010 10:43:17 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ArsEAEt6aktFpaN9/2dsb2JhbACBM9YehEwEimY
X-IronPort-AV: E=Sophos;i="4.49,405,1262581200"; d="scan'208";a="55315361"
Received: from 69-165-163-125.dsl.teksavvy.com (HELO ceviche.home)
	([69.165.163.125])
	by ironport2-out.pppoe.ca with ESMTP; 04 Feb 2010 10:43:11 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id CE793B4270; Thu,  4 Feb 2010 10:43:11 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Message-ID: <jwvaavproqk.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
	<87k4uvyhia.fsf@HIDDEN>
	<jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN>
	<87ljf93l75.fsf@HIDDEN>
Date: Thu, 04 Feb 2010 10:43:11 -0500
In-Reply-To: <87ljf93l75.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	04 Feb 2010 02:01:02 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.2 (--)

>>> mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
>>> document is visited as text because in this case the major mode is not
>>> doc-view-mode.
>> Fair enough, go for it,
> Do you mean putting mode-class=special on `doc-view-mode'?

Yes.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 4 Feb 2010 00:34:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 03 19:34:09 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Ncpfd-0004PM-3u
	for submit <at> debbugs.gnu.org; Wed, 03 Feb 2010 19:34:09 -0500
Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1Ncpfb-0004P4-3q
	for 4896@HIDDEN; Wed, 03 Feb 2010 19:34:07 -0500
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.30.224.cable.starman.ee [82.131.30.224])
	by mx2.starman.ee (Postfix) with ESMTP id D54503F40AE;
	Thu,  4 Feb 2010 02:33:56 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
	<87k4uvyhia.fsf@HIDDEN>
	<jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN>
Date: Thu, 04 Feb 2010 02:01:02 +0200
In-Reply-To: <jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Tue, 02 Feb 2010 21:36:19 -0500")
Message-ID: <87ljf93l75.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.9 (--)

>> mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
>> document is visited as text because in this case the major mode is not
>> doc-view-mode.
>
> Fair enough, go for it,

Do you mean putting mode-class=special on `doc-view-mode'?

=== modified file 'lisp/doc-view.el'
--- lisp/doc-view.el	2010-02-01 18:25:47 +0000
+++ lisp/doc-view.el	2010-02-03 23:57:08 +0000
@@ -1124,7 +1124,7 @@ (defun doc-view-search-previous-match (a
 
 ;;;; User interface commands and the mode
 
-;; (put 'doc-view-mode 'mode-class 'special)
+(put 'doc-view-mode 'mode-class 'special)
 
 (defun doc-view-already-converted-p ()
   "Return non-nil if the current doc was already converted."

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 3 Feb 2010 02:36:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 02 21:36:26 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NcV6Q-0007SQ-2P
	for submit <at> debbugs.gnu.org; Tue, 02 Feb 2010 21:36:26 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.183]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1NcV6O-0007SL-3n
	for 4896@HIDDEN; Tue, 02 Feb 2010 21:36:24 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvgEAKJvaEtFpaN9/2dsb2JhbACBM9hOhEUEils
X-IronPort-AV: E=Sophos;i="4.49,395,1262581200"; d="scan'208";a="55206298"
Received: from 69-165-163-125.dsl.teksavvy.com (HELO ceviche.home)
	([69.165.163.125])
	by ironport2-out.pppoe.ca with ESMTP; 02 Feb 2010 21:36:20 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id 1CC4CB41DC; Tue,  2 Feb 2010 21:36:20 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Message-ID: <jwveil3uju0.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
	<87k4uvyhia.fsf@HIDDEN>
Date: Tue, 02 Feb 2010 21:36:19 -0500
In-Reply-To: <87k4uvyhia.fsf@HIDDEN> (Juri Linkov's message of "Wed,
	03 Feb 2010 00:49:00 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.3 (--)

> mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
> document is visited as text because in this case the major mode is not
> doc-view-mode.

Fair enough, go for it,


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 2 Feb 2010 22:52:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 02 17:52:00 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NcRb7-0005DS-Mz
	for submit <at> debbugs.gnu.org; Tue, 02 Feb 2010 17:51:59 -0500
Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1NcRb5-0005DL-8Z
	for 4896@HIDDEN; Tue, 02 Feb 2010 17:51:52 -0500
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.99.225.cable.starman.ee [82.131.99.225])
	by mx2.starman.ee (Postfix) with ESMTP id 3DD813F406E;
	Wed,  3 Feb 2010 00:51:40 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
	<jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
Date: Wed, 03 Feb 2010 00:49:00 +0200
In-Reply-To: <jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Mon, 01 Feb 2010 21:45:34 -0500")
Message-ID: <87k4uvyhia.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.9 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.9 (--)

>> Stefan, do you remember why you commented out this line?
>> When `doc-view-mode' has this `mode-class' property, then
>> viewing a PDF file from Dired doesn't activates View-mode.
>
> Because I think that mode-class is for buffers whose content is
> generated from a process or something like that, not from files.
> Things like dired, pcl-cvs, ibuffer, shell-mode, compilation-mode, ...
>
>> (And setting `view-read-only' to nil is not necessary anymore.)
>
> Why not?

Because its value is inessential with (put 'doc-view-mode 'mode-class 'special).
Functions `after-find-file', `view-file', `toggle-read-only' check for
`mode-class' to not activate view-mode when major mode is special.

Do you think we should add another similar property applicable only to
disabling view-mode?

>> Also I discovered another case: visiting a PDF file from a tar archive
>> activates View-mode, because `tar-extract' tries to mimic `view-file'
>> but ignores the `mode-class' property.  The patch below fixes this bug
>> for tar-mode.el by duplicating more code from `view-file'.
>
>> After feature freeze this duplicate code could be moved
>> from `view-file' to `view-buffer'.
>
> I think the right solution should be to let the major mode say
> explicitly that it is mutually-exclusive with view-mode.

mode-class=special already says that it is mutually-exclusive with
view-mode, and a new similar property could do the same.

> And it should be a dynamic property: it should only apply when the
> ps/pdf/dvi document is displayed as an image, not when it's displayed
> as text.

mode-class=special already doesn't disable view-mode when the ps/pdf/dvi
document is visited as text because in this case the major mode is not
doc-view-mode.

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 2 Feb 2010 02:45:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 01 21:45:52 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nc8lz-0000k6-P3
	for submit <at> debbugs.gnu.org; Mon, 01 Feb 2010 21:45:51 -0500
Received: from ironport2-out.teksavvy.com ([206.248.154.181]
	helo=ironport2-out.pppoe.ca)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <monnier@HIDDEN>) id 1Nc8lm-0000jx-TT
	for 4896@HIDDEN; Mon, 01 Feb 2010 21:45:51 -0500
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AsQEAHogZ0tFpaN9/2dsb2JhbACBM9g5hEUEilo
X-IronPort-AV: E=Sophos;i="4.49,387,1262581200"; d="scan'208";a="55123025"
Received: from 69-165-163-125.dsl.teksavvy.com (HELO ceviche.home)
	([69.165.163.125])
	by ironport2-out.pppoe.ca with ESMTP; 01 Feb 2010 21:45:35 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id D32A4B461F; Mon,  1 Feb 2010 21:45:34 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Message-ID: <jwv7hqwwecy.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
	<87y6jcfs9u.fsf_-_@HIDDEN>
Date: Mon, 01 Feb 2010 21:45:34 -0500
In-Reply-To: <87y6jcfs9u.fsf_-_@HIDDEN> (Juri Linkov's message of
	"Tue, 02 Feb 2010 01:30:37 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -2.4 (--)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.4 (--)

>>> (set (make-local-variable 'view-read-only) nil)
>> This still doesn't work in all cases.

No, but it's still a correct setting.

> Stefan, do you remember why you commented out this line?
> When `doc-view-mode' has this `mode-class' property, then
> viewing a PDF file from Dired doesn't activates View-mode.

Because I think that mode-class is for buffers whose content is
generated from a process or something like that, not from files.
Things like dired, pcl-cvs, ibuffer, shell-mode, compilation-mode, ...

> (And setting `view-read-only' to nil is not necessary anymore.)

Why not?

> Also I discovered another case: visiting a PDF file from a tar archive
> activates View-mode, because `tar-extract' tries to mimic `view-file'
> but ignores the `mode-class' property.  The patch below fixes this bug
> for tar-mode.el by duplicating more code from `view-file'.

> After feature freeze this duplicate code could be moved
> from `view-file' to `view-buffer'.

I think the right solution should be to let the major mode say
explicitly that it is mutually-exclusive with view-mode.  And it should
be a dynamic property: it should only apply when the ps/pdf/dvi document
is displayed as an image, not when it's displayed as text.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

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


Received: (at 4896) by debbugs.gnu.org; 1 Feb 2010 23:36:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 01 18:36:25 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Nc5oe-00072Q-Qq
	for submit <at> debbugs.gnu.org; Mon, 01 Feb 2010 18:36:25 -0500
Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <juri@HIDDEN>) id 1Nc5oc-00072I-VJ
	for 4896@HIDDEN; Mon, 01 Feb 2010 18:36:23 -0500
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.53.239.cable.starman.ee [82.131.53.239])
	by mx2.starman.ee (Postfix) with ESMTP id 43DF13F40B3;
	Tue,  2 Feb 2010 01:36:12 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Subject: Re: bug#4896: Doc-view-mode with View-mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN> <87d42flgc0.fsf@HIDDEN>
Date: Tue, 02 Feb 2010 01:30:37 +0200
In-Reply-To: <87d42flgc0.fsf@HIDDEN> (Juri Linkov's message of "Wed,
	16 Dec 2009 11:23:16 +0200")
Message-ID: <87y6jcfs9u.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 4896
Cc: 4896 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
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/pipermail/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.0 (---)

>>     (set (make-local-variable 'view-read-only) nil)
>
> This still doesn't work in all cases.  Typing `v' on a PDF file in Dired
> activates View-mode (I type RET in Dired when the intention is to *edit*
> the file, and type `v' when the intention is to *view* the file).
>
> Doc-view-mode has no chance to disable view-mode, because view-file
> (called from dired-view-file) at first visits the file with
> find-file-noselect that enables doc-view-mode, and after that
> view-file enables view-mode.
>
> View-file doesn't enable view-mode only when the property `mode-class' is
> `special'.  Actually lisp/doc-view.el already contains the necessary line,
> but it is commented out:
>
> ;; (put 'doc-view-mode 'mode-class 'special)
>
> I wonder what was the reason for commenting this out?

Stefan, do you remember why you commented out this line?

When `doc-view-mode' has this `mode-class' property, then
viewing a PDF file from Dired doesn't activates View-mode.
(And setting `view-read-only' to nil is not necessary anymore.)

Also I discovered another case: visiting a PDF file from a tar archive
activates View-mode, because `tar-extract' tries to mimic `view-file'
but ignores the `mode-class' property.  The patch below fixes this bug
for tar-mode.el by duplicating more code from `view-file'.

After feature freeze this duplicate code could be moved
from `view-file' to `view-buffer'.

=== modified file 'lisp/doc-view.el'
--- lisp/doc-view.el	2010-02-01 18:25:47 +0000
+++ lisp/doc-view.el	2010-02-01 23:01:10 +0000
@@ -1124,7 +1124,7 @@ (defun doc-view-search-previous-match (a
 
 ;;;; User interface commands and the mode
 
-;; (put 'doc-view-mode 'mode-class 'special)
+(put 'doc-view-mode 'mode-class 'special)
 
 (defun doc-view-already-converted-p ()
   "Return non-nil if the current doc was already converted."
@@ -1302,7 +1302,7 @@ (defun doc-view-mode ()
     ;; canonical view mode for PDF/PS/DVI files.  This could be
     ;; switched on automatically depending on the value of
     ;; `view-read-only'.
-    (set (make-local-variable 'view-read-only) nil)
+    ;; (set (make-local-variable 'view-read-only) nil)
     (run-mode-hooks 'doc-view-mode-hook)))
 
 ;;;###autoload

=== modified file 'lisp/tar-mode.el'
--- lisp/tar-mode.el	2010-01-13 08:35:10 +0000
+++ lisp/tar-mode.el	2010-02-01 23:01:10 +0000
@@ -852,14 +852,23 @@ (defun tar-extract (&optional other-wind
           (set (make-local-variable 'tar-superior-descriptor) descriptor)
           (setq buffer-read-only read-only-p)
           (tar-subfile-mode 1)))
-      (if view-p
-	  (view-buffer
-	   buffer (and just-created 'kill-buffer-if-not-modified))
-	(if (eq other-window-p 'display)
-	    (display-buffer buffer)
-	  (if other-window-p
-	      (switch-to-buffer-other-window buffer)
-	    (switch-to-buffer buffer)))))))
+      (cond
+       (view-p
+	;; FIXME: code duplicated from `view-file', perhaps the test for special
+	;; mode-class should be moved from `view-file' to `view-buffer'.  (Bug#4896)
+	(if (eq (with-current-buffer buffer
+		  (get major-mode 'mode-class))
+		'special)
+	    (progn
+	      (switch-to-buffer buffer)
+	      (message "Not using View mode because the major mode is special"))
+	  (view-buffer buffer (and just-created 'kill-buffer-if-not-modified))))
+       ((eq other-window-p 'display)
+	(display-buffer buffer))
+       (other-window-p
+	(switch-to-buffer-other-window buffer))
+       (t
+	(switch-to-buffer buffer))))))
 
 
 (defun tar-extract-other-window ()

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 16 Dec 2009 09:33:49 +0000
From juri@HIDDEN Wed Dec 16 01:33:48 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBG9Xlkg006123
	for <4896@HIDDEN>; Wed, 16 Dec 2009 01:33:48 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.94.242.cable.starman.ee [82.131.94.242])
	by mx1.starman.ee (Postfix) with ESMTP id CC6AE3F41DE;
	Wed, 16 Dec 2009 11:33:39 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
	<87tywk12rm.fsf@HIDDEN>
Date: Wed, 16 Dec 2009 11:23:16 +0200
In-Reply-To: <87tywk12rm.fsf@HIDDEN> (Juri Linkov's message of "Tue,
	24 Nov 2009 19:06:45 +0200")
Message-ID: <87d42flgc0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> Maybe we should switch off view-mode in doc-view-mode explicitly?  IMO
>> doc-view-mode is THE view-mode for PDF/DVI/PS files...
>
> Thanks.  It seems your fix doesn't work.  The reason is that
> `after-find-file' calls `view-mode-enter' *after* calling
> `doc-view-mode' via `normal-mode'.
>
> However, adding the following line to the end of `doc-view-mode'
> seems to work (because `after-find-file' checks for `view-read-only'
> before calling `view-mode-enter'):
>
>     (set (make-local-variable 'view-read-only) nil)

This still doesn't work in all cases.  Typing `v' on a PDF file in Dired
activates View-mode (I type RET in Dired when the intention is to *edit*
the file, and type `v' when the intention is to *view* the file).

Doc-view-mode has no chance to disable view-mode, because view-file
(called from dired-view-file) at first visits the file with
find-file-noselect that enables doc-view-mode, and after that
view-file enables view-mode.

View-file doesn't enable view-mode only when the property `mode-class' is
`special'.  Actually lisp/doc-view.el already contains the necessary line,
but it is commented out:

;; (put 'doc-view-mode 'mode-class 'special)

I wonder what was the reason for commenting this out?

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 30 Nov 2009 16:22:18 +0000
From juri@HIDDEN Mon Nov 30 08:22:17 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx2.starman.ee (smtp-out4.starman.ee [85.253.0.6])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAUGMGon031749
	for <4896@HIDDEN>; Mon, 30 Nov 2009 08:22:17 -0800
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.52.137.cable.starman.ee [82.131.52.137])
	by mx2.starman.ee (Postfix) with ESMTP id 49F6B3F40BF;
	Mon, 30 Nov 2009 18:22:10 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
	<87zl65m9id.fsf@HIDDEN> <87ljhp9f2i.fsf@HIDDEN>
	<87zl64xybm.fsf@HIDDEN> <87zl64ur64.fsf@HIDDEN>
	<87d43016ea.fsf@HIDDEN>
Date: Mon, 30 Nov 2009 18:17:22 +0200
In-Reply-To: <87d43016ea.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 30 Nov 2009 14:36:29 +0100")
Message-ID: <87iqcsqdnt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>>> If doc-view-continuous-kind has a value `none' and there's an interface
>>> for changing the value quickly, I'm also satisfied without having a
>>> minor mode. :-)
>>
>> But currently `doc-view-continuous-mode' has the same purpose with a
>> different name :-)
>
> I totally agree with everything you say, and I don't want to argue about
> the name.  -mode is not my favourite, because it sounds like a minor
> mode variable.

That's is good that we've identified the problem.  The suffix -mode
suggests that it's a mode while it is not.

> How about doc-view-continuous-style?

In one of my intermediate versions I named this variable
doc-view-continuous-level that I think is an equally bad name :-)

So I installed a patch that simply removes the suffix -mode
to use a simpler name `doc-view-continuous'.

> What's important to me is that the default style can be customized,
> *and* that there's an interface command to switch to another style when
> viewing a document.

Yes, now `doc-view-continuous' can be customized and also its value
can be selected from the menu and saved as the default value.
Later we could add more values such as "Smooth" for smooth scrolling
and "Restrictive" to not jump to the next/previous page on SPC/DEL.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 30 Nov 2009 13:36:33 +0000
From tassilo@HIDDEN Mon Nov 30 05:36:33 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAUDaWHW012095
	for <4896@HIDDEN>; Mon, 30 Nov 2009 05:36:33 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 7E3CF78A31B8;
	Mon, 30 Nov 2009 14:36:31 +0100 (CET)
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 26726-02; Mon, 30 Nov 2009 14:36:31 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.94.103])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 606C778A30A4;
	Mon, 30 Nov 2009 14:36:30 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
	<87zl65m9id.fsf@HIDDEN> <87ljhp9f2i.fsf@HIDDEN>
	<87zl64xybm.fsf@HIDDEN> <87zl64ur64.fsf@HIDDEN>
Date: Mon, 30 Nov 2009 14:36:29 +0100
In-Reply-To: <87zl64ur64.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	30 Nov 2009 14:04:59 +0200")
Message-ID: <87d43016ea.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

Hi Juri,

>> If doc-view-continuous-kind has a value `none' and there's an interface
>> for changing the value quickly, I'm also satisfied without having a
>> minor mode. :-)
>
> But currently `doc-view-continuous-mode' has the same purpose with a
> different name :-)

I totally agree with everything you say, and I don't want to argue about
the name.  -mode is not my favourite, because it sounds like a minor
mode variable.  How about doc-view-continuous-style?

What's important to me is that the default style can be customized,
*and* that there's an interface command to switch to another style when
viewing a document.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 30 Nov 2009 12:44:54 +0000
From juri@HIDDEN Mon Nov 30 04:44:54 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAUCirkC007059
	for <4896@HIDDEN>; Mon, 30 Nov 2009 04:44:54 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.52.137.cable.starman.ee [82.131.52.137])
	by mx1.starman.ee (Postfix) with ESMTP id 9E1563F4113;
	Mon, 30 Nov 2009 14:44:47 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
	<87zl65m9id.fsf@HIDDEN> <87ljhp9f2i.fsf@HIDDEN>
	<87zl64xybm.fsf@HIDDEN>
Date: Mon, 30 Nov 2009 14:04:59 +0200
In-Reply-To: <87zl64xybm.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 30 Nov 2009 08:32:13 +0100")
Message-ID: <87zl64ur64.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>>> We could have a variable `doc-view-continuous-kind' and a minor mode
>>> `doc-view-continuous-mode'.  To me the current behavior, smooth
>>> scrolling or even auto-scrolling are all different kinds of
>>> continuous mode.
>>>
>>> This would allow the flexibility you are striving for while still
>>> make it easy for user to toggle to non-continuous mode.
>>
>> But this means that continuous mode should be enabled by default,
>> because the current default behavior is a kind of continuous mode that
>> allows only SPC and DEL to jump to the next/previous page.
>>
>> This means that users will be interested only in changing the value of
>> `doc-view-continuous-kind' (interactively from the menu or with a
>> command bound to some key).  Thus the minor mode
>> `doc-view-continuous-mode' will be useless.
>
> If doc-view-continuous-kind has a value `none' and there's an interface
> for changing the value quickly, I'm also satisfied without having a
> minor mode. :-)

But currently `doc-view-continuous-mode' has the same purpose with
a different name :-)

Generally, what I what to achieve is to do the same as in stand-alone
PDF viewers - there is only one menu item "Continuous mode".  However,
continuous mode is implemented differently: some PDF viewers use
smooth scrolling, other PDF viewers display only one image at a time.
With a variable like `doc-view-continuous-kind', we could make this
difference customizable.  We should to find a way to do this cleanly.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 30 Nov 2009 07:32:17 +0000
From tassilo@HIDDEN Sun Nov 29 23:32:17 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.2 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAU7WF8I010547
	for <4896@HIDDEN>; Sun, 29 Nov 2009 23:32:16 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 90D9578A3180;
	Mon, 30 Nov 2009 08:32:14 +0100 (CET)
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 02588-03; Mon, 30 Nov 2009 08:32:14 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.94.103])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 06AD178A2439;
	Mon, 30 Nov 2009 08:32:13 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
	<87zl65m9id.fsf@HIDDEN> <87ljhp9f2i.fsf@HIDDEN>
Date: Mon, 30 Nov 2009 08:32:13 +0100
In-Reply-To: <87ljhp9f2i.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	30 Nov 2009 00:05:57 +0200")
Message-ID: <87zl64xybm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

Hi Juri,

>> We could have a variable `doc-view-continuous-kind' and a minor mode
>> `doc-view-continuous-mode'.  To me the current behavior, smooth
>> scrolling or even auto-scrolling are all different kinds of
>> continuous mode.
>>
>> This would allow the flexibility you are striving for while still
>> make it easy for user to toggle to non-continuous mode.
>
> But this means that continuous mode should be enabled by default,
> because the current default behavior is a kind of continuous mode that
> allows only SPC and DEL to jump to the next/previous page.
>
> This means that users will be interested only in changing the value of
> `doc-view-continuous-kind' (interactively from the menu or with a
> command bound to some key).  Thus the minor mode
> `doc-view-continuous-mode' will be useless.

If doc-view-continuous-kind has a value `none' and there's an interface
for changing the value quickly, I'm also satisfied without having a
minor mode. :-)

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 29 Nov 2009 22:19:21 +0000
From juri@HIDDEN Sun Nov 29 14:19:20 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nATMJJ5I020115
	for <4896@HIDDEN>; Sun, 29 Nov 2009 14:19:20 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.32.20.cable.starman.ee [82.131.32.20])
	by mx1.starman.ee (Postfix) with ESMTP id 6561B3F4110;
	Mon, 30 Nov 2009 00:19:12 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
	<87zl65m9id.fsf@HIDDEN>
Date: Mon, 30 Nov 2009 00:05:57 +0200
In-Reply-To: <87zl65m9id.fsf@HIDDEN> (Tassilo Horn's message of
	"Sun, 29 Nov 2009 20:11:22 +0100")
Message-ID: <87ljhp9f2i.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> After implementing more smooth scrolling, we could later add a third
>> value (e.g. `smooth') to the customizable variable
>> `doc-view-continuous-mode'.  But with a minor mode this would not be
>> possible.
>
> We could have a variable `doc-view-continuous-kind' and a minor mode
> `doc-view-continuous-mode'.  To me the current behavior, smooth
> scrolling or even auto-scrolling are all different kinds of continuous
> mode.
>
> This would allow the flexibility you are striving for while still make
> it easy for user to toggle to non-continuous mode.

But this means that continuous mode should be enabled by default,
because the current default behavior is a kind of continuous mode
that allows only SPC and DEL to jump to the next/previous page.

This means that users will be interested only in changing the value of
`doc-view-continuous-kind' (interactively from the menu or with a command
bound to some key).  Thus the minor mode `doc-view-continuous-mode'
will be useless.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 29 Nov 2009 19:11:29 +0000
From tassilo@HIDDEN Sun Nov 29 11:11:28 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nATJBRX3002986
	for <4896@HIDDEN>; Sun, 29 Nov 2009 11:11:28 -0800
Received: from compute1.internal (compute1.internal [10.202.2.41])
	by gateway1.messagingengine.com (Postfix) with ESMTP id 4DBFEC4CA2;
	Sun, 29 Nov 2009 14:11:27 -0500 (EST)
Received: from heartbeat2.messagingengine.com ([10.202.2.161])
  by compute1.internal (MEProxy); Sun, 29 Nov 2009 14:11:27 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=smtpout; bh=Kkea63sAIuVhPwHtuZqb4SFfpjw=; b=mA1U9wvcMx6QI1vgnFmUlgwJ90pFOlmcawJo+mh9vkCwvUoN6z0qjGnP0IOsOaRMhFqr00U37VU5mntmV+Ry60x6UPkq3hWTpe+CkpB5TG1urwjb/vd3D3tRxL1XkVBCWso0Sk7ETudM9D+NNk0142NNgOkge8NtA1hv2sHYfyk=
X-Sasl-enc: 2ehjaGTeQe6djW2quie+kXPOldoK5LwU4r/ZHSf+eHOT 1259521886
Received: from thinkpad.tsdh.de (p54AF2699.dip0.t-ipconnect.de [84.175.38.153])
	by mail.messagingengine.com (Postfix) with ESMTPA id 23CD91799;
	Sun, 29 Nov 2009 14:11:25 -0500 (EST)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
In-Reply-To: <877ht98ioi.fsf@HIDDEN> (Juri Linkov's message of "Sun,
	29 Nov 2009 18:05:01 +0200")
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN> <877ht98ioi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
Date: Sun, 29 Nov 2009 20:11:22 +0100
Message-ID: <87zl65m9id.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Juri Linkov <juri@HIDDEN> writes:

Hi Juri,

>> I tried it out, and I'd prefer to have a minor mode, because although
>> I like the continuous mode, sometimes I have to switch it off.  With
>> a minor mode and the command bound to some key that would be more
>> convenient that M-: (setq doc-view-continuous-mode nil) RET.
>
> After implementing more smooth scrolling, we could later add a third
> value (e.g. `smooth') to the customizable variable
> `doc-view-continuous-mode'.  But with a minor mode this would not be
> possible.

We could have a variable `doc-view-continuous-kind' and a minor mode
`doc-view-continuous-mode'.  To me the current behavior, smooth
scrolling or even auto-scrolling are all different kinds of continuous
mode.

This would allow the flexibility you are striving for while still make
it easy for user to toggle to non-continuous mode.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 29 Nov 2009 16:07:38 +0000
From juri@HIDDEN Sun Nov 29 08:07:38 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx2.starman.ee (smtp-out4.starman.ee [85.253.0.6])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nATG7aQ8018118
	for <4896@HIDDEN>; Sun, 29 Nov 2009 08:07:37 -0800
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.68.144.cable.starman.ee [82.131.68.144])
	by mx2.starman.ee (Postfix) with ESMTP id 8CA733F40D2;
	Sun, 29 Nov 2009 18:07:31 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
	<87638t1y0x.fsf@HIDDEN>
Date: Sun, 29 Nov 2009 18:05:01 +0200
In-Reply-To: <87638t1y0x.fsf@HIDDEN> (Tassilo Horn's message of
	"Sun, 29 Nov 2009 10:27:26 +0100")
Message-ID: <877ht98ioi.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> If there are problems with that, maybe we should create a minor mode?
>
> I tried it out, and I'd prefer to have a minor mode, because although
> I like the continuous mode, sometimes I have to switch it off.
> With a minor mode and the command bound to some key that would be more
> convenient that M-: (setq doc-view-continuous-mode nil) RET.

After implementing more smooth scrolling, we could later add
a third value (e.g. `smooth') to the customizable variable
`doc-view-continuous-mode'.  But with a minor mode this would not
be possible.  Or when somebody will request to not allow SPC and DEL
to scroll to the next/previous page, we could add a fourth value.
IOW, with defcustom we have more degrees of freedom.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 29 Nov 2009 09:27:32 +0000
From tassilo@HIDDEN Sun Nov 29 01:27:31 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAT9RU69013817
	for <4896@HIDDEN>; Sun, 29 Nov 2009 01:27:31 -0800
Received: from compute2.internal (compute2.internal [10.202.2.42])
	by gateway1.messagingengine.com (Postfix) with ESMTP id 98E5CC3F6C;
	Sun, 29 Nov 2009 04:27:29 -0500 (EST)
Received: from heartbeat1.messagingengine.com ([10.202.2.160])
  by compute2.internal (MEProxy); Sun, 29 Nov 2009 04:27:29 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=smtpout; bh=Wqen31NTLwmoi4BEvciNNVaA5kw=; b=uLQuJ2kSY2tNZIu3dWLF1VZqT7BrjApz4tB025Jk1Mhz03KThSWXAo/fOH79KG8ZG9n+HllQPdKLI2tyFeEMH8OzBJfwuOu4OQXcisfXDcuseirfO/xyLlxi68EaIQ4SeCQ7cDDtxrWZu/9Vpwb+o78ZoP6tIvdPJ3m2Dy0EN34=
X-Sasl-enc: iWV2TBm4b3p+TZm9GWfm4hieCKBdpVkTB4tFKtKCy7eh 1259486849
Received: from thinkpad.tsdh.de (p54AF2699.dip0.t-ipconnect.de [84.175.38.153])
	by mail.messagingengine.com (Postfix) with ESMTPA id 76DD749B847;
	Sun, 29 Nov 2009 04:27:28 -0500 (EST)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
In-Reply-To: <mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN> (Juri
	Linkov's message of "Sun, 29 Nov 2009 00:52:57 +0200")
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<mailman.11748.1259452054.2239.bug-gnu-emacs@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
Date: Sun, 29 Nov 2009 10:27:26 +0100
Message-ID: <87638t1y0x.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

Juri Linkov <juri@HIDDEN> writes:

> If there are problems with that, maybe we should create a minor mode?

I tried it out, and I'd prefer to have a minor mode, because although I
like the continuous mode, sometimes I have to switch it off.  With a
minor mode and the command bound to some key that would be more
convenient that M-: (setq doc-view-continuous-mode nil) RET.

> However, Continuous mode as a minor mode would complicate interactions
> with another minor mode `doc-view-minor-mode' with questions like
> should `C-c C-c' disable `doc-view-continuous-mode' and should another
> `C-c C-c' re-enable it, and so on?

doc-view minor mode should always be off in doc-view buffers.  Its
intention is to be active when editing a PDF/PS/DVI document in
fundamental or ps-mode.  There, it only provides the key binding C-c C-c
to switch to doc-view quickly.

So I don't see how both minor modes would interfer with each other,
except that the C-c C-c key is already used.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 28 Nov 2009 23:28:15 +0000
From juri@HIDDEN Sat Nov 28 15:28:14 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,FVGT_m_MULTI_ODD,
	HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nASNSD0c024802
	for <4896@HIDDEN>; Sat, 28 Nov 2009 15:28:14 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.33.180.cable.starman.ee [82.131.33.180])
	by mx1.starman.ee (Postfix) with ESMTP id 627A03F40E1;
	Sun, 29 Nov 2009 01:28:07 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
Date: Sun, 29 Nov 2009 00:52:57 +0200
In-Reply-To: <87my2dlcs3.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 23 Nov 2009 12:07:56 +0100")
Message-ID: <87vdgu5jp9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

I tried to add a menu item for `doc-view-continuous-mode' with
the following patch, but it doesn't look nice since currently
`doc-view-continuous-mode' is a variable.

If there are problems with that, maybe we should create a minor mode?
However, Continuous mode as a minor mode would complicate interactions
with another minor mode `doc-view-minor-mode' with questions like
should `C-c C-c' disable `doc-view-continuous-mode' and should another
`C-c C-c' re-enable it, and so on?

Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.92
diff -u -r1.92 doc-view.el
--- lisp/doc-view.el	25 Nov 2009 17:21:15 -0000	1.92
+++ lisp/doc-view.el	28 Nov 2009 22:51:02 -0000
@@ -332,13 +332,18 @@
 (easy-menu-define doc-view-menu doc-view-mode-map
   "Menu for Doc View mode."
   '("DocView"
+    ["Toggle display"		doc-view-toggle-display]
+    ["Continuous mode"		(setq doc-view-continuous-mode
+				      (not doc-view-continuous-mode))
+     :style toggle
+     :selected doc-view-continuous-mode]
+    "---"
     ["Set Slice"		doc-view-set-slice-using-mouse]
     ["Set Slice (manual)"	doc-view-set-slice]
     ["Reset Slice"		doc-view-reset-slice]
     "---"
     ["Search"			doc-view-search]
     ["Search Backwards"         doc-view-search-backward]
-    ["Toggle display"		doc-view-toggle-display]
     ))
 
 (defvar doc-view-minor-mode-map

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 25 Nov 2009 17:31:39 +0000
From juri@HIDDEN Wed Nov 25 09:31:39 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAPHVbem010129
	for <4896@HIDDEN>; Wed, 25 Nov 2009 09:31:39 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.52.48.cable.starman.ee [82.131.52.48])
	by mx1.starman.ee (Postfix) with ESMTP id 232853F4139;
	Wed, 25 Nov 2009 19:31:29 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<87my2dyzh7.fsf@HIDDEN> <877htgyrwy.fsf@HIDDEN>
	<jwv3a43k8r5.fsf-monnier+emacsbugreports@HIDDEN>
Date: Wed, 25 Nov 2009 19:28:55 +0200
In-Reply-To: <jwv3a43k8r5.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Tue, 24 Nov 2009 14:48:36 -0500")
Message-ID: <87d436aaiy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> I guess starting with mwheel-scroll-up/down-function is less invasive.

Done.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 24 Nov 2009 19:48:40 +0000
From monnier@HIDDEN Tue Nov 24 11:48:40 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAOJmbET016542
	for <4896@HIDDEN>; Tue, 24 Nov 2009 11:48:39 -0800
Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAOJma6a005473;
	Tue, 24 Nov 2009 14:48:36 -0500
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id 7FA313A1B6; Tue, 24 Nov 2009 14:48:36 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org, Tassilo Horn <tassilo@HIDDEN>
Subject: Re: bug#4896: DocView: Continuous mode
Message-ID: <jwv3a43k8r5.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<87my2dyzh7.fsf@HIDDEN> <877htgyrwy.fsf@HIDDEN>
Date: Tue, 24 Nov 2009 14:48:36 -0500
In-Reply-To: <877htgyrwy.fsf@HIDDEN> (Juri Linkov's message of "Tue,
	24 Nov 2009 19:08:09 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3413=0

> Any ideas how to specify doc-view scrolling functions for mwheel.el
> in doc-view continuous mode?

mwheel could introduce mwheel-scroll-up-function and
mwheel-scroll-up-function (with global defaults of scroll-up and
scroll-down, obviously) which doc-view could set buffer-locally.

Or we could rename scroll-up/down to scroll-up/down-internal and let
scroll-up/down obey new scroll-up/down-function hooks.

I guess starting with mwheel-scroll-up/down-function is less invasive.


        Stefan


> Index: lisp/mwheel.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/mwheel.el,v
> retrieving revision 1.56
> diff -u -r1.56 mwheel.el
> --- lisp/mwheel.el	12 Sep 2009 19:03:52 -0000	1.56
> +++ lisp/mwheel.el	24 Nov 2009 17:07:28 -0000
> @@ -206,7 +206,10 @@
>      (unwind-protect
>  	(let ((button (mwheel-event-button event)))
>  	  (cond ((eq button mouse-wheel-down-event)
> -                 (condition-case nil (scroll-down amt)
> +                 (condition-case nil
> +		     (if (eq major-mode 'doc-view-mode)
> +			 (doc-view-scroll-down-or-previous-page amt)
> +		       (scroll-down amt))
>                     ;; Make sure we do indeed scroll to the beginning of
>                     ;; the buffer.
>                     (beginning-of-buffer
> @@ -221,7 +224,10 @@
>                        ;; to only affect scroll-down.  --Stef
>                        (set-window-start (selected-window) (point-min))))))
>  		((eq button mouse-wheel-up-event)
> -                 (condition-case nil (scroll-up amt)
> +                 (condition-case nil
> +		     (if (eq major-mode 'doc-view-mode)
> +			 (doc-view-scroll-up-or-next-page amt)
> +		       (scroll-up amt))
>                     ;; Make sure we do indeed scroll to the end of the buffer.
>                     (end-of-buffer (while t (scroll-up)))))
>  		(t (error "Bad binding in mwheel-scroll"))))

> Index: lisp/doc-view.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
> retrieving revision 1.90
> diff -u -r1.90 doc-view.el
> --- lisp/doc-view.el	24 Nov 2009 07:47:49 -0000	1.90
> +++ lisp/doc-view.el	24 Nov 2009 17:07:00 -0000
> @@ -431,24 +431,24 @@
>    (interactive)
>    (doc-view-goto-page (length doc-view-current-files)))
 
> -(defun doc-view-scroll-up-or-next-page ()
> +(defun doc-view-scroll-up-or-next-page (&optional n)
>    "Scroll page up if possible, else goto next page."
> -  (interactive)
> +  (interactive "^P")
>    (let ((hscroll (window-hscroll))
>  	(cur-page (doc-view-current-page)))
> -    (when (= (window-vscroll) (image-scroll-up nil))
> +    (when (= (window-vscroll) (image-scroll-up n))
>        (doc-view-next-page)
>        (when (/= cur-page (doc-view-current-page))
>  	(image-bob)
>  	(image-bol 1))
>        (set-window-hscroll (selected-window) hscroll))))
 
> -(defun doc-view-scroll-down-or-previous-page ()
> +(defun doc-view-scroll-down-or-previous-page (&optional n)
>    "Scroll page down if possible, else goto previous page."
> -  (interactive)
> +  (interactive "^P")
>    (let ((hscroll (window-hscroll))
>  	(cur-page (doc-view-current-page)))
> -    (when (= (window-vscroll) (image-scroll-down nil))
> +    (when (= (window-vscroll) (image-scroll-down n))
>        (doc-view-previous-page)
>        (when (/= cur-page (doc-view-current-page))
>  	(image-eob)

> -- 
> Juri Linkov
> http://www.jurta.org/emacs/



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 24 Nov 2009 17:15:41 +0000
From juri@HIDDEN Tue Nov 24 09:15:41 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAOHFdrJ002949
	for <4896@HIDDEN>; Tue, 24 Nov 2009 09:15:41 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.34.225.cable.starman.ee [82.131.34.225])
	by mx1.starman.ee (Postfix) with ESMTP id 99B903F412B;
	Tue, 24 Nov 2009 19:15:33 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
Date: Tue, 24 Nov 2009 19:06:19 +0200
In-Reply-To: <871vk3ubwj.fsf@HIDDEN> (Tassilo Horn's message of
	"Thu, 12 Nov 2009 14:10:20 +0100")
Message-ID: <87skc4vycv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>>> One big buffer, where all images are shown each on its own line?
>>
>> Hmm, maybe.  Do you think this will cause problems with a large number
>> of pages and corresponding images in the same buffer?
>
> I don't know.  Just try it out by inserting all PNGs of some PDF
> into a buffer.

Later we could try to implement more smooth scrolling
similar to Google Books powered book previews like e.g.
http://oreilly.com/catalog/9780596153618/preview
It fills the page with placeholders for all images
that display the initial text "Loading..." and loads
an image only when you scroll to it.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 24 Nov 2009 17:15:41 +0000
From juri@HIDDEN Tue Nov 24 09:15:41 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAOHFd9l002948
	for <4896@HIDDEN>; Tue, 24 Nov 2009 09:15:41 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.34.225.cable.starman.ee [82.131.34.225])
	by mx1.starman.ee (Postfix) with ESMTP id 11C133F411D;
	Tue, 24 Nov 2009 19:15:33 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: 4896 <at> debbugs.gnu.org
Cc: Tassilo Horn <tassilo@HIDDEN>,
        Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
	<87my2dyzh7.fsf@HIDDEN>
Date: Tue, 24 Nov 2009 19:08:09 +0200
In-Reply-To: <87my2dyzh7.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	23 Nov 2009 22:43:32 +0200")
Message-ID: <877htgyrwy.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>>> However, I still have no idea how make the mouse-wheel to jump to the
>>> next/previous page depending on the value of
>>> `doc-view-continuous-mode'.
>>
>> Can't you simply bind mouse-4/5 to the two new functions?
>
> mwheel.el provides many useful settings like `mouse-wheel-scroll-amount'
> that we should respect in DocView.

`mwheel-scroll' relies on `scroll-up' and `scroll-down' to do its job with
the specified values of `mouse-wheel-scroll-amount'.  It would be good
if it was able to use doc-view scrolling.

Below is a proof of concept, not the final patch.  It provides the
correct behavior of the mouse wheel scrolling in continuous mode.

Any ideas how to specify doc-view scrolling functions for mwheel.el
in doc-view continuous mode?

Index: lisp/mwheel.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mwheel.el,v
retrieving revision 1.56
diff -u -r1.56 mwheel.el
--- lisp/mwheel.el	12 Sep 2009 19:03:52 -0000	1.56
+++ lisp/mwheel.el	24 Nov 2009 17:07:28 -0000
@@ -206,7 +206,10 @@
     (unwind-protect
 	(let ((button (mwheel-event-button event)))
 	  (cond ((eq button mouse-wheel-down-event)
-                 (condition-case nil (scroll-down amt)
+                 (condition-case nil
+		     (if (eq major-mode 'doc-view-mode)
+			 (doc-view-scroll-down-or-previous-page amt)
+		       (scroll-down amt))
                    ;; Make sure we do indeed scroll to the beginning of
                    ;; the buffer.
                    (beginning-of-buffer
@@ -221,7 +224,10 @@
                       ;; to only affect scroll-down.  --Stef
                       (set-window-start (selected-window) (point-min))))))
 		((eq button mouse-wheel-up-event)
-                 (condition-case nil (scroll-up amt)
+                 (condition-case nil
+		     (if (eq major-mode 'doc-view-mode)
+			 (doc-view-scroll-up-or-next-page amt)
+		       (scroll-up amt))
                    ;; Make sure we do indeed scroll to the end of the buffer.
                    (end-of-buffer (while t (scroll-up)))))
 		(t (error "Bad binding in mwheel-scroll"))))

Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.90
diff -u -r1.90 doc-view.el
--- lisp/doc-view.el	24 Nov 2009 07:47:49 -0000	1.90
+++ lisp/doc-view.el	24 Nov 2009 17:07:00 -0000
@@ -431,24 +431,24 @@
   (interactive)
   (doc-view-goto-page (length doc-view-current-files)))
 
-(defun doc-view-scroll-up-or-next-page ()
+(defun doc-view-scroll-up-or-next-page (&optional n)
   "Scroll page up if possible, else goto next page."
-  (interactive)
+  (interactive "^P")
   (let ((hscroll (window-hscroll))
 	(cur-page (doc-view-current-page)))
-    (when (= (window-vscroll) (image-scroll-up nil))
+    (when (= (window-vscroll) (image-scroll-up n))
       (doc-view-next-page)
       (when (/= cur-page (doc-view-current-page))
 	(image-bob)
 	(image-bol 1))
       (set-window-hscroll (selected-window) hscroll))))
 
-(defun doc-view-scroll-down-or-previous-page ()
+(defun doc-view-scroll-down-or-previous-page (&optional n)
   "Scroll page down if possible, else goto previous page."
-  (interactive)
+  (interactive "^P")
   (let ((hscroll (window-hscroll))
 	(cur-page (doc-view-current-page)))
-    (when (= (window-vscroll) (image-scroll-down nil))
+    (when (= (window-vscroll) (image-scroll-down n))
       (doc-view-previous-page)
       (when (/= cur-page (doc-view-current-page))
 	(image-eob)

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 24 Nov 2009 17:15:40 +0000
From juri@HIDDEN Tue Nov 24 09:15:40 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAOHFcEE002947
	for <4896@HIDDEN>; Tue, 24 Nov 2009 09:15:40 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.34.225.cable.starman.ee [82.131.34.225])
	by mx1.starman.ee (Postfix) with ESMTP id D7BAC3F40EF;
	Tue, 24 Nov 2009 19:15:31 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
Date: Tue, 24 Nov 2009 19:06:45 +0200
In-Reply-To: <87r5rplcz9.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 23 Nov 2009 12:03:38 +0100")
Message-ID: <87tywk12rm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> Multi-page scolling doesn't always work even with SPC and DEL.
>> Visiting a PDF file puts it to read-only mode, that puts it to
>> view-mode (when `view-read-only' is t).
>
> Hm, at least, that's not the default value.
>
>> And view-mode overrides DocView's SPC and DEL bindings with its own
>> SPC and DEL bindings (`View-scroll-page-forward' and
>> `View-scroll-page-backward') that are incompatible with image
>> scrolling.
>
> Maybe we should switch off view-mode in doc-view-mode explicitly?  IMO
> doc-view-mode is THE view-mode for PDF/DVI/PS files...

Thanks.  It seems your fix doesn't work.  The reason is that
`after-find-file' calls `view-mode-enter' *after* calling
`doc-view-mode' via `normal-mode'.

However, adding the following line to the end of `doc-view-mode'
seems to work (because `after-find-file' checks for `view-read-only'
before calling `view-mode-enter'):

    (set (make-local-variable 'view-read-only) nil)

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 21:36:05 +0000
From monnier@HIDDEN Mon Nov 23 13:36:05 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANLa3eb024724
	for <4896@HIDDEN>; Mon, 23 Nov 2009 13:36:04 -0800
Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nANLa2tw026295;
	Mon, 23 Nov 2009 16:36:02 -0500
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id A87033A261; Mon, 23 Nov 2009 16:36:02 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Juri Linkov <juri@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Message-ID: <jwvtywkhqkn.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN> <87r5rplcz9.fsf@HIDDEN>
Date: Mon, 23 Nov 2009 16:36:02 -0500
In-Reply-To: <87r5rplcz9.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 23 Nov 2009 12:03:38 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3412=0

> Maybe we should switch off view-mode in doc-view-mode explicitly?  IMO
> doc-view-mode is THE view-mode for PDF/DVI/PS files...

Yes, we should,


        Stefan



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 20:48:37 +0000
From juri@HIDDEN Mon Nov 23 12:48:36 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx2.starman.ee (smtp-out4.starman.ee [85.253.0.6])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANKmZxN019943
	for <4896@HIDDEN>; Mon, 23 Nov 2009 12:48:36 -0800
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.34.24.cable.starman.ee [82.131.34.24])
	by mx2.starman.ee (Postfix) with ESMTP id D324A3F40D1;
	Mon, 23 Nov 2009 22:48:28 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN> <87my2dlcs3.fsf@HIDDEN>
Date: Mon, 23 Nov 2009 22:43:32 +0200
In-Reply-To: <87my2dlcs3.fsf@HIDDEN> (Tassilo Horn's message of
	"Mon, 23 Nov 2009 12:07:56 +0100")
Message-ID: <87my2dyzh7.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

>> The following patch adds a new variable `doc-view-continuous-mode' and
>> uses it in two new commands `doc-view-next-line-or-next-page' and
>> `doc-view-previous-line-or-previous-page'.
>
> Looks good to me, except that I have the feeling that this whole "check
> if scolling happened" thingy could be refactored into its own functions
> and used from doc-view-scroll-up-or-next-page and
> doc-view-next-line-or-next-page (and the other two).

Yes, this could be refactored after we reach a more/less final
implementation.

>> However, I still have no idea how make the mouse-wheel to jump to the
>> next/previous page depending on the value of
>> `doc-view-continuous-mode'.
>
> Can't you simply bind mouse-4/5 to the two new functions?

mwheel.el provides many useful settings like `mouse-wheel-scroll-amount'
that we should respect in DocView.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 11:08:01 +0000
From tassilo@HIDDEN Mon Nov 23 03:08:01 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANB7xRs026450
	for <4896@HIDDEN>; Mon, 23 Nov 2009 03:08:00 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 1BFBB78A2C70;
	Mon, 23 Nov 2009 12:07:59 +0100 (CET)
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 05192-07; Mon, 23 Nov 2009 12:07:56 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.95.131])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id A622778A2C5C;
	Mon, 23 Nov 2009 12:07:56 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
	<87r5rpindl.fsf@HIDDEN>
Date: Mon, 23 Nov 2009 12:07:56 +0100
In-Reply-To: <87r5rpindl.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	23 Nov 2009 11:47:18 +0200")
Message-ID: <87my2dlcs3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

Hi Juri,

> The following patch adds a new variable `doc-view-continuous-mode' and
> uses it in two new commands `doc-view-next-line-or-next-page' and
> `doc-view-previous-line-or-previous-page'.

Looks good to me, except that I have the feeling that this whole "check
if scolling happened" thingy could be refactored into its own functions
and used from doc-view-scroll-up-or-next-page and
doc-view-next-line-or-next-page (and the other two).

> However, I still have no idea how make the mouse-wheel to jump to the
> next/previous page depending on the value of
> `doc-view-continuous-mode'.

Can't you simply bind mouse-4/5 to the two new functions?

Bye,
Tassilo

> Index: lisp/doc-view.el
> ===================================================================
> RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
> retrieving revision 1.88
> diff -c -r1.88 doc-view.el
> *** lisp/doc-view.el	17 Jul 2009 19:43:53 -0000	1.88
> --- lisp/doc-view.el	23 Nov 2009 09:45:37 -0000
> ***************
> *** 222,227 ****
> --- 222,236 ----
>     :type 'integer
>     :group 'doc-view)
>   
> + (defcustom doc-view-continuous-mode nil
> +   "In Continuous mode reaching the page edge advances to the next/previous page.
> + When non-nil, scrolling a line upward at the bottom edge of the page
> + moves to the next page, and scrolling a line downward at the top edge
> + of the page moves to the previous page."
> +   :type 'boolean
> +   :group 'doc-view
> +   :version "23.2")
> + 
>   ;;;; Internal Variables
>   
>   (defun doc-view-new-window-function (winprops)
> ***************
> *** 286,291 ****
> --- 295,304 ----
>       (define-key map [remap backward-page] 'doc-view-previous-page)
>       (define-key map (kbd "SPC")       'doc-view-scroll-up-or-next-page)
>       (define-key map (kbd "DEL")       'doc-view-scroll-down-or-previous-page)
> +     (define-key map (kbd "C-n")       'doc-view-next-line-or-next-page)
> +     (define-key map (kbd "<down>")    'doc-view-next-line-or-next-page)
> +     (define-key map (kbd "C-p")       'doc-view-previous-line-or-previous-page)
> +     (define-key map (kbd "<up>")      'doc-view-previous-line-or-previous-page)
>       (define-key map (kbd "M-<")       'doc-view-first-page)
>       (define-key map (kbd "M->")       'doc-view-last-page)
>       (define-key map [remap goto-line] 'doc-view-goto-page)
> ***************
> *** 442,447 ****
> --- 455,492 ----
>   	(image-bol 1))
>         (set-window-hscroll (selected-window) hscroll))))
>   
> + (defun doc-view-next-line-or-next-page (&optional n)
> +   "Scroll upward by N lines if possible, else goto next page.
> + When `doc-view-continuous-mode' is non-nil, scrolling a line upward at
> + the bottom edge of the page moves to the next page."
> +   (interactive "p")
> +   (if doc-view-continuous-mode
> +       (let ((hscroll (window-hscroll))
> + 	    (cur-page (doc-view-current-page)))
> + 	(when (= (window-vscroll) (image-next-line n))
> + 	  (doc-view-next-page)
> + 	  (when (/= cur-page (doc-view-current-page))
> + 	    (image-bob)
> + 	    (image-bol 1))
> + 	  (set-window-hscroll (selected-window) hscroll)))
> +     (image-next-line 1)))
> + 
> + (defun doc-view-previous-line-or-previous-page (&optional n)
> +   "Scroll downward by N lines if possible, else goto previous page.
> + When `doc-view-continuous-mode' is non-nil, scrolling a line downward
> + at the top edge of the page moves to the previous page."
> +   (interactive "p")
> +   (if doc-view-continuous-mode
> +       (let ((hscroll (window-hscroll))
> + 	    (cur-page (doc-view-current-page)))
> + 	(when (= (window-vscroll) (image-previous-line n))
> + 	  (doc-view-previous-page)
> + 	  (when (/= cur-page (doc-view-current-page))
> + 	    (image-eob)
> + 	    (image-bol 1))
> + 	  (set-window-hscroll (selected-window) hscroll)))
> +     (image-previous-line n)))
> + 
>   ;;;; Utility Functions
>   
>   (defun doc-view-kill-proc ()



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 11:03:42 +0000
From tassilo@HIDDEN Mon Nov 23 03:03:42 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANB3ewd025120
	for <4896@HIDDEN>; Mon, 23 Nov 2009 03:03:41 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 6868778A23F3;
	Mon, 23 Nov 2009 12:03:39 +0100 (CET)
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 04261-04; Mon, 23 Nov 2009 12:03:38 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.95.131])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id A91F278A2370;
	Mon, 23 Nov 2009 12:03:38 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87aaye1p3u.fsf@HIDDEN>
Date: Mon, 23 Nov 2009 12:03:38 +0100
In-Reply-To: <87aaye1p3u.fsf@HIDDEN> (Juri Linkov's message of "Mon,
	23 Nov 2009 11:52:19 +0200")
Message-ID: <87r5rplcz9.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

Hi Juri,

>> There's some "minor continuous mode", i.e. when you scroll with SPC
>> and DEL, you will finally switch pages and start at the beginning/end
>> respectively.  But still, there's only one image in the buffer.
>
> Multi-page scolling doesn't always work even with SPC and DEL.
> Visiting a PDF file puts it to read-only mode, that puts it to
> view-mode (when `view-read-only' is t).

Hm, at least, that's not the default value.

> And view-mode overrides DocView's SPC and DEL bindings with its own
> SPC and DEL bindings (`View-scroll-page-forward' and
> `View-scroll-page-backward') that are incompatible with image
> scrolling.

Maybe we should switch off view-mode in doc-view-mode explicitly?  IMO
doc-view-mode is THE view-mode for PDF/DVI/PS files...

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 10:40:56 +0000
From juri@HIDDEN Mon Nov 23 02:40:56 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER,
	MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANAeqR6019109
	for <4896@HIDDEN>; Mon, 23 Nov 2009 02:40:54 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.34.24.cable.starman.ee [82.131.34.24])
	by mx1.starman.ee (Postfix) with ESMTP id CB10A3F4229;
	Mon, 23 Nov 2009 12:40:45 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: Tassilo Horn <tassilo@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
Date: Mon, 23 Nov 2009 11:47:18 +0200
In-Reply-To: <jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Thu, 12 Nov 2009 10:49:57 -0500")
Message-ID: <87r5rpindl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> > I think mouse-4/5 once where bound to
> > doc-view-scroll-down-or-previous-page and
> > doc-view-scroll-down-or-previous-page previously, so they scrolled or
> > switched pages back then.  I don't know why this was changed.  I guess,
> > because one "press" of mouse-4/5 scrolled a half page, which was a bit
> > unusual...
>
> I can't remember why it was changed either, but I for one would dislike
> it if scrolling the image with the wheel would suddenly switch to the
> next/previous page: when I scroll it's usually because I want to center
> the image differently.
>
> So I do think that we need 2 modes: a continuous mode and the current mode.

The following patch adds a new variable `doc-view-continuous-mode'
and uses it in two new commands `doc-view-next-line-or-next-page'
and `doc-view-previous-line-or-previous-page'.  However, I still
have no idea how make the mouse-wheel to jump to the next/previous
page depending on the value of `doc-view-continuous-mode'.

Index: lisp/doc-view.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/doc-view.el,v
retrieving revision 1.88
diff -c -r1.88 doc-view.el
*** lisp/doc-view.el	17 Jul 2009 19:43:53 -0000	1.88
--- lisp/doc-view.el	23 Nov 2009 09:45:37 -0000
***************
*** 222,227 ****
--- 222,236 ----
    :type 'integer
    :group 'doc-view)
  
+ (defcustom doc-view-continuous-mode nil
+   "In Continuous mode reaching the page edge advances to the next/previous page.
+ When non-nil, scrolling a line upward at the bottom edge of the page
+ moves to the next page, and scrolling a line downward at the top edge
+ of the page moves to the previous page."
+   :type 'boolean
+   :group 'doc-view
+   :version "23.2")
+ 
  ;;;; Internal Variables
  
  (defun doc-view-new-window-function (winprops)
***************
*** 286,291 ****
--- 295,304 ----
      (define-key map [remap backward-page] 'doc-view-previous-page)
      (define-key map (kbd "SPC")       'doc-view-scroll-up-or-next-page)
      (define-key map (kbd "DEL")       'doc-view-scroll-down-or-previous-page)
+     (define-key map (kbd "C-n")       'doc-view-next-line-or-next-page)
+     (define-key map (kbd "<down>")    'doc-view-next-line-or-next-page)
+     (define-key map (kbd "C-p")       'doc-view-previous-line-or-previous-page)
+     (define-key map (kbd "<up>")      'doc-view-previous-line-or-previous-page)
      (define-key map (kbd "M-<")       'doc-view-first-page)
      (define-key map (kbd "M->")       'doc-view-last-page)
      (define-key map [remap goto-line] 'doc-view-goto-page)
***************
*** 442,447 ****
--- 455,492 ----
  	(image-bol 1))
        (set-window-hscroll (selected-window) hscroll))))
  
+ (defun doc-view-next-line-or-next-page (&optional n)
+   "Scroll upward by N lines if possible, else goto next page.
+ When `doc-view-continuous-mode' is non-nil, scrolling a line upward at
+ the bottom edge of the page moves to the next page."
+   (interactive "p")
+   (if doc-view-continuous-mode
+       (let ((hscroll (window-hscroll))
+ 	    (cur-page (doc-view-current-page)))
+ 	(when (= (window-vscroll) (image-next-line n))
+ 	  (doc-view-next-page)
+ 	  (when (/= cur-page (doc-view-current-page))
+ 	    (image-bob)
+ 	    (image-bol 1))
+ 	  (set-window-hscroll (selected-window) hscroll)))
+     (image-next-line 1)))
+ 
+ (defun doc-view-previous-line-or-previous-page (&optional n)
+   "Scroll downward by N lines if possible, else goto previous page.
+ When `doc-view-continuous-mode' is non-nil, scrolling a line downward
+ at the top edge of the page moves to the previous page."
+   (interactive "p")
+   (if doc-view-continuous-mode
+       (let ((hscroll (window-hscroll))
+ 	    (cur-page (doc-view-current-page)))
+ 	(when (= (window-vscroll) (image-previous-line n))
+ 	  (doc-view-previous-page)
+ 	  (when (/= cur-page (doc-view-current-page))
+ 	    (image-eob)
+ 	    (image-bol 1))
+ 	  (set-window-hscroll (selected-window) hscroll)))
+     (image-previous-line n)))
+ 
  ;;;; Utility Functions
  
  (defun doc-view-kill-proc ()

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 23 Nov 2009 10:40:54 +0000
From juri@HIDDEN Mon Nov 23 02:40:54 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out3.starman.ee [85.253.0.5])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nANAeqEK019108
	for <4896@HIDDEN>; Mon, 23 Nov 2009 02:40:53 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.34.24.cable.starman.ee [82.131.34.24])
	by mx1.starman.ee (Postfix) with ESMTP id 29E173F4226;
	Mon, 23 Nov 2009 12:40:44 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
Date: Mon, 23 Nov 2009 11:52:19 +0200
In-Reply-To: <87aayst364.fsf@HIDDEN> (Tassilo Horn's message of
	"Thu, 12 Nov 2009 12:04:19 +0100")
Message-ID: <87aaye1p3u.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> There's some "minor continuous mode", i.e. when you scroll with SPC and
> DEL, you will finally switch pages and start at the beginning/end
> respectively.  But still, there's only one image in the buffer.

Multi-page scolling doesn't always work even with SPC and DEL.
Visiting a PDF file puts it to read-only mode, that puts it to view-mode
(when `view-read-only' is t).  And view-mode overrides DocView's SPC and
DEL bindings with its own SPC and DEL bindings (`View-scroll-page-forward'
and `View-scroll-page-backward') that are incompatible with image scrolling.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 16:01:26 +0000
From tassilo@HIDDEN Thu Nov 12 08:01:26 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.6 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACG1OHW020789
	for <4896@HIDDEN>; Thu, 12 Nov 2009 08:01:26 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 3457478A243C;
	Thu, 12 Nov 2009 17:01:24 +0100 (CET)
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 13524-04; Thu, 12 Nov 2009 17:01:23 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.94.174])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 8096E78A23E2;
	Thu, 12 Nov 2009 17:01:23 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: Juri Linkov <juri@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
	<jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
Date: Thu, 12 Nov 2009 17:01:23 +0100
In-Reply-To: <jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Thu, 12 Nov 2009 10:49:57 -0500")
Message-ID: <873a4jspf0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Stefan Monnier <monnier@HIDDEN> writes:

>>> Hmm, maybe.  Do you think this will cause problems with a large
>>> number of pages and corresponding images in the same buffer?
>
> I can't think of any reason why that would be a problem.  OTOH the
> scrolling commands will need to be changed, and that may prove more
> difficult.

Ah, right.  All scrolling is done with the relevant image-* functions,
and AFAIK, they only work for buffers containing exactly one image and
nothing else, but I might be wrong here.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 15:50:06 +0000
From monnier@HIDDEN Thu Nov 12 07:50:06 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.5 required=4.0 tests=AWL,FOURLA,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from ironport2-out.pppoe.ca (ironport2-out.teksavvy.com [206.248.154.181])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACFo4Fk019712
	for <4896@HIDDEN>; Thu, 12 Nov 2009 07:50:05 -0800
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AvIEAO+9+0pMCpsp/2dsb2JhbACBTtwTgkKBegSJKA
X-IronPort-AV: E=Sophos;i="4.44,728,1249272000"; 
   d="scan'208";a="49225816"
Received: from 76-10-155-41.dsl.teksavvy.com (HELO ceviche.home) ([76.10.155.41])
  by ironport2-out.pppoe.ca with ESMTP; 12 Nov 2009 10:49:59 -0500
Received: by ceviche.home (Postfix, from userid 20848)
	id CD4B370072; Thu, 12 Nov 2009 10:49:57 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Juri Linkov <juri@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Message-ID: <jwv8webhhm8.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN> <871vk3ubwj.fsf@HIDDEN>
Date: Thu, 12 Nov 2009 10:49:57 -0500
In-Reply-To: <871vk3ubwj.fsf@HIDDEN> (Tassilo Horn's message of
	"Thu, 12 Nov 2009 14:10:20 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> I think mouse-4/5 once where bound to
> doc-view-scroll-down-or-previous-page and
> doc-view-scroll-down-or-previous-page previously, so they scrolled or
> switched pages back then.  I don't know why this was changed.  I guess,
> because one "press" of mouse-4/5 scrolled a half page, which was a bit
> unusual...

I can't remember why it was changed either, but I for one would dislike
it if scrolling the image with the wheel would suddenly switch to the
next/previous page: when I scroll it's usually because I want to center
the image differently.
So I do think that we need 2 modes: a continuous mode and the current mode.

>> Hmm, maybe.  Do you think this will cause problems with a large number
>> of pages and corresponding images in the same buffer?

I can't think of any reason why that would be a problem.  OTOH the
scrolling commands will need to be changed, and that may prove
more difficult.

> What could be a problem with multiple images in one buffer is the
> (re)conversion process on a first load of a document, or if a user wants
> to adjust the scaling, or the doc has changed.

At least for PDFs, it should be fairly easy to adjust the current code
to DTRT.


        Stefan



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 13:10:24 +0000
From tassilo@HIDDEN Thu Nov 12 05:10:23 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.7 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACDALSi006030
	for <4896@HIDDEN>; Thu, 12 Nov 2009 05:10:23 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 42F9878A23C7;
	Thu, 12 Nov 2009 14:10:21 +0100 (CET)
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 10059-03-2; Thu, 12 Nov 2009 14:10:20 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.94.174])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 4955778A2C5B;
	Thu, 12 Nov 2009 14:10:20 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
	<87d43o2dgc.fsf@HIDDEN>
Date: Thu, 12 Nov 2009 14:10:20 +0100
In-Reply-To: <87d43o2dgc.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	12 Nov 2009 13:14:19 +0200")
Message-ID: <871vk3ubwj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

>> What do you exactly mean with Continuous mode?
>
> I mean a mode to scroll through document pages without having to use
> the previous-page and next-page keys like I described in the first
> message:
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4896

I'm fine with everything you mentioned there.

I think mouse-4/5 once where bound to
doc-view-scroll-down-or-previous-page and
doc-view-scroll-down-or-previous-page previously, so they scrolled or
switched pages back then.  I don't know why this was changed.  I guess,
because one "press" of mouse-4/5 scrolled a half page, which was a bit
unusual...

>> One big buffer, where all images are shown each on its own line?
>
> Hmm, maybe.  Do you think this will cause problems with a large number
> of pages and corresponding images in the same buffer?

I don't know.  Just try it out by inserting all PNGs of some PDF into a
buffer.

What could be a problem with multiple images in one buffer is the
(re)conversion process on a first load of a document, or if a user wants
to adjust the scaling, or the doc has changed.  Then, one PNG after the
other changes, starting with the current one.  The conversion sentinel
is usually only called, when the whole thing has finished, but when all
PNGs are visible in the buffer, it would be better to refresh the images
as soon as a new one has finished.

The current implementation refreshes the current page, as soon as it is
(re)converted, by converting a list of important pages (the current one
and maybe some more) first so that the sentinel is called several times,
but that only works for PDFs.

>> There's some "minor continuous mode", i.e. when you scroll with SPC
>> and DEL, you will finally switch pages and start at the beginning/end
>> respectively.
>
> Yes, SPC and DEL already scroll continuously.
>
>> But still, there's only one image in the buffer.
>
> In the simplest case, one image is enough, provided that C-n/C-p and
> mouse scroll will jump to the next/previous page.  That's what
> `evince' and `kpdf' do in non-continuous mode.

Agreed.  So C-n/C-p should be bound to new functions that normally call
image-next/prev-line, or switch pages and scroll, just like
doc-view-scroll-down-or-previous-page and
doc-view-scroll-down-or-previous-page do.

> Ideally, there could be two images at a time, where you see the tail of
> the previous page and the head of the next page.

Maybe.  But the other changes are a first and simple step in the right
direction.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 11:27:46 +0000
From juri@HIDDEN Thu Nov 12 03:27:46 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx2.starman.ee (smtp-out2.starman.ee [85.253.0.4])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACBRiB4023854
	for <4896@HIDDEN>; Thu, 12 Nov 2009 03:27:46 -0800
X-Virus-Scanned: by Amavisd-New at mx2.starman.ee
Received: from mail.starman.ee (82.131.30.134.cable.starman.ee [82.131.30.134])
	by mx2.starman.ee (Postfix) with ESMTP id E572C3F40AB;
	Thu, 12 Nov 2009 13:27:36 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Tassilo Horn <tassilo@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN> <87aayst364.fsf@HIDDEN>
Date: Thu, 12 Nov 2009 13:14:19 +0200
In-Reply-To: <87aayst364.fsf@HIDDEN> (Tassilo Horn's message of
	"Thu, 12 Nov 2009 12:04:19 +0100")
Message-ID: <87d43o2dgc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

> What do you exactly mean with Continuous mode?

I mean a mode to scroll through document pages without having to use the
previous-page and next-page keys like I described in the first message:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=4896

> One big buffer, where all images are shown each on its own line?

Hmm, maybe.  Do you think this will cause problems with a large number
of pages and corresponding images in the same buffer?

> There's some "minor continuous mode", i.e. when you scroll with SPC and
> DEL, you will finally switch pages and start at the beginning/end
> respectively.

Yes, SPC and DEL already scroll continuously.

> But still, there's only one image in the buffer.

In the simplest case, one image is enough, provided that C-n/C-p
and mouse scroll will jump to the next/previous page.  That's what
`evince' and `kpdf' do in non-continuous mode.

Ideally, there could be two images at a time, where you see the tail of
the previous page and the head of the next page.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 11:04:23 +0000
From tassilo@HIDDEN Thu Nov 12 03:04:23 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACB4Lrw021035
	for <4896@HIDDEN>; Thu, 12 Nov 2009 03:04:23 -0800
Received: from localhost (localhost [127.0.0.1])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id DB90578A23E2;
	Thu, 12 Nov 2009 12:04:20 +0100 (CET)
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 24107-05; Thu, 12 Nov 2009 12:04:20 +0100 (CET)
X-CHKRCPT: Envelopesender noch tassilo@HIDDEN
Received: from thinkpad.tsdh.de (unknown [141.26.94.174])
	by deliver.uni-koblenz.de (Postfix) with ESMTP id 1EF3478A23CC;
	Thu, 12 Nov 2009 12:04:20 +0100 (CET)
From: Tassilo Horn <tassilo@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: Stefan Monnier <monnier@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
	<87ocn8i9qn.fsf@HIDDEN>
Date: Thu, 12 Nov 2009 12:04:19 +0100
In-Reply-To: <87ocn8i9qn.fsf@HIDDEN> (Juri Linkov's message of "Thu,
	12 Nov 2009 11:57:52 +0200")
Message-ID: <87aayst364.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Virus-Scanned: amavisd-new at uni-koblenz.de

Juri Linkov <juri@HIDDEN> writes:

Hi Juri!

>>> What I mean is the continuous page mode where you can scroll through
>>> document pages without having to use the previous-page and next-page keys.
>> [...]
>>> Any opinions on implementing this?
>>
>> Go for it (tho still supporting the page-by-page mode, of course: I
>> much prefer it since it makes it possible to browse thorugh the whole
>> document without wasting screen real estate on its margins).
>
> Since most stand-alone PDF views don't enable Continuous mode by
> default, we could keep the current page-by-page mode in DocView as
> well.

What do you exactly mean with Continuous mode?  One big buffer, where
all images are shown each on its own line?  I think that would be nice
sometimes.

There's some "minor continuous mode", i.e. when you scroll with SPC and
DEL, you will finally switch pages and start at the beginning/end
respectively.  But still, there's only one image in the buffer.

Anyway, here you have a "go for it" from my side, too.  I think doc-view
is not too hard-wired to this "one page at a time" style, so it sounds
quite doable.

Bye,
Tassilo



Acknowledgement sent to Tassilo Horn <tassilo@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 12 Nov 2009 10:05:35 +0000
From juri@HIDDEN Thu Nov 12 02:05:34 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nACA5XKH016865
	for <4896@HIDDEN>; Thu, 12 Nov 2009 02:05:34 -0800
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (82.131.30.134.cable.starman.ee [82.131.30.134])
	by mx1.starman.ee (Postfix) with ESMTP id 98F033F41D3;
	Thu, 12 Nov 2009 12:05:27 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Cc: Tassilo Horn <tassilo@HIDDEN>, 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Organization: JURTA
References: <87tyx2anec.fsf@HIDDEN>
	<jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
Date: Thu, 12 Nov 2009 11:57:52 +0200
In-Reply-To: <jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN> (Stefan
	Monnier's message of "Tue, 10 Nov 2009 13:03:59 -0500")
Message-ID: <87ocn8i9qn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii

[Cc'ed DocView's maintainer Tassilo Horn]

>> What I mean is the continuous page mode where you can scroll through
>> document pages without having to use the previous-page and next-page keys.
> [...]
>> Any opinions on implementing this?
>
> Go for it (tho still supporting the page-by-page mode, of course: I much
> prefer it since it makes it possible to browse thorugh the whole
> document without wasting screen real estate on its margins).

Since most stand-alone PDF views don't enable Continuous mode by default,
we could keep the current page-by-page mode in DocView as well.

-- 
Juri Linkov
http://www.jurta.org/emacs/



Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.
Severity set to 'wishlist' from 'normal' Request was from Glenn Morris <rgm@HIDDEN> to control@HIDDEN. Full text available.

Message received at 4896@HIDDEN:


Received: (at 4896) by emacsbugs.donarmstrong.com; 10 Nov 2009 18:04:02 +0000
From monnier@HIDDEN Tue Nov 10 10:04:01 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-3.9 required=4.0 tests=AWL,HAS_BUG_NUMBER
	autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02
Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAAI3xbM008127
	for <4896@HIDDEN>; Tue, 10 Nov 2009 10:04:01 -0800
Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177])
	by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id nAAI3xDx021935;
	Tue, 10 Nov 2009 13:03:59 -0500
Received: by faina.iro.umontreal.ca (Postfix, from userid 20848)
	id 0D7443A1DA; Tue, 10 Nov 2009 13:03:59 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Cc: 4896 <at> debbugs.gnu.org
Subject: Re: bug#4896: DocView: Continuous mode
Message-ID: <jwvfx8mxnsn.fsf-monnier+emacsbugreports@HIDDEN>
References: <87tyx2anec.fsf@HIDDEN>
Date: Tue, 10 Nov 2009 13:03:59 -0500
In-Reply-To: <87tyx2anec.fsf@HIDDEN> (Juri Linkov's message of "Tue,
	10 Nov 2009 09:45:31 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 1 Rules triggered
	RV3403=0

> What I mean is the continuous page mode where you can scroll through
> document pages without having to use the previous-page and next-page keys.
[...]
> Any opinions on implementing this?

Go for it (tho still supporting the page-by-page mode, of course: I much
prefer it since it makes it possible to browse thorugh the whole
document without wasting screen real estate on its margins).

> Also please consider the following comments on the current keys
> in DocView:

I have no opinion on this.


        Stefan



Acknowledgement sent to Stefan Monnier <monnier@HIDDEN>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Information forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; Package emacs. Full text available.

Message received at submit@HIDDEN:


Received: (at submit) by emacsbugs.donarmstrong.com; 10 Nov 2009 08:20:57 +0000
From juri@HIDDEN Tue Nov 10 00:20:57 2009
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on rzlab.ucr.edu
X-Spam-Level: 
X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available.
	hammytokens:Tokens not available.
X-Spam-Status: No, score=-0.8 required=4.0 tests=AWL autolearn=ham
	version=3.2.5-bugs.debian.org_2005_01_02
Received: from lists.gnu.org (lists.gnu.org [199.232.76.165])
	by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAA8KtST030056
	for <submit@HIDDEN>; Tue, 10 Nov 2009 00:20:56 -0800
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1N7lyA-0002WI-U5
	for bug-gnu-emacs@HIDDEN; Tue, 10 Nov 2009 03:20:54 -0500
Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43)
	id 1N7ly6-0002UM-0h
	for bug-gnu-emacs@HIDDEN; Tue, 10 Nov 2009 03:20:54 -0500
Received: from [199.232.76.173] (port=44870 helo=monty-python.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43)
	id 1N7ly5-0002UF-Rr
	for bug-gnu-emacs@HIDDEN; Tue, 10 Nov 2009 03:20:49 -0500
Received: from smtp-out1.starman.ee ([85.253.0.3]:41018 helo=mx1.starman.ee)
	by monty-python.gnu.org with esmtp (Exim 4.60)
	(envelope-from <juri@HIDDEN>)
	id 1N7ly5-00079z-HD
	for bug-gnu-emacs@HIDDEN; Tue, 10 Nov 2009 03:20:49 -0500
X-Virus-Scanned: by Amavisd-New at mx1.starman.ee
Received: from mail.starman.ee (62.65.211.91.cable.starman.ee [62.65.211.91])
	by mx1.starman.ee (Postfix) with ESMTP id 0EE7B3F4203
	for <bug-gnu-emacs@HIDDEN>; Tue, 10 Nov 2009 09:52:02 +0200 (EET)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: DocView: Continuous mode
Organization: JURTA
Date: Tue, 10 Nov 2009 09:45:31 +0200
Message-ID: <87tyx2anec.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4)

Most of my attempts to use DocView often end up by resorting to
stand-alone PDF viewers.  The reason is a single missing feature
that would be easy to implement in DocView.

What I mean is the continuous page mode where you can scroll through
document pages without having to use the previous-page and next-page keys.

With smooth scrolling, navigation keys like C-p/<up> and C-n/<down>
on reaching the beginning/end of the current page should advance to the
previous/next page.

Using the mouse in the continuous mode requires advancing to another
page on the page edges.

Any opinions on implementing this?

Also please consider the following comments on the current keys
in DocView:

<C-home> doesn't move to the top the document like `M-<' does.
and <C-end> doesn't move to the bottom the document like `M->' does.
But in normal buffers, <C-home> is equivalent to `M-<', and
<C-end> is equivalent to `M->'.

`M->' doesn't move to the end of the document, it moves to the beginning
of the last page, but not to the end of the last page.  However, as I see
in other PDF viewers, <C-end> moves to the beginning of the last page.
So maybe in DocView it should do the same.

After rebinding <C-home>/<C-end> there will be no keys to move to the
beginning/end of the current page (image).  Maybe logically suitable
keys are: `C-a'/<home> and `C-e'/<end>?

-- 
Juri Linkov
http://www.jurta.org/emacs/




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs@HIDDEN>. Full text available.
Report forwarded to bug-submit-list@HIDDEN, Emacs Bugs <bug-gnu-emacs@HIDDEN>:
bug#4896; 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.