From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alexis Newsgroups: gmane.emacs.devel Subject: Re: Page navigation in doc-view.el Date: Thu, 15 Jan 2015 22:34:23 +1100 Message-ID: <87bnm05lc0.fsf@gmail.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1421321688 17019 80.91.229.3 (15 Jan 2015 11:34:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 11:34:48 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 15 12:34:42 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBihD-0002BI-ML for ged-emacs-devel@m.gmane.org; Thu, 15 Jan 2015 12:34:39 +0100 Original-Received: from localhost ([::1]:50164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBihC-0004Bn-7c for ged-emacs-devel@m.gmane.org; Thu, 15 Jan 2015 06:34:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBih9-0004Bi-2u for emacs-devel@gnu.org; Thu, 15 Jan 2015 06:34:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBih5-0004K2-T7 for emacs-devel@gnu.org; Thu, 15 Jan 2015 06:34:35 -0500 Original-Received: from mail-pa0-x22b.google.com ([2607:f8b0:400e:c03::22b]:57927) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBih5-0004Ju-K4 for emacs-devel@gnu.org; Thu, 15 Jan 2015 06:34:31 -0500 Original-Received: by mail-pa0-f43.google.com with SMTP id kx10so17054894pab.2 for ; Thu, 15 Jan 2015 03:34:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:from:to:subject:in-reply-to:date:message-id:mime-version :content-type; bh=92GtNwaGwJoTGYt3AxAt6bjdBzKBpbfJSW6cBCyqY/g=; b=R046aF15BfgqMbDGeByp0hQWE2bEBmSYkYijDBGpax4QHP8cmFhIoLpSD9jCcxxeHP HHHDZs79554kP1kYmRkF3Sgk90iefk/9m625zLeF5Y0hW+Dbxz64ViXiG8hwFSq3bfPY 6E2QHHujarOmhLhhaANcSbhXPd+n/Fi5dCyi3h9Cp9x9cmqCX2EMjwdNPzvN0EeQHp+T IIkfXKv7mJj966oBPoTBMgM9cdCo5kkEmbMvrYQWidykxGm+B/0QJs2zWxCD4sqBbBQp Sn8wSN88ozClMDxJpwTsXYGn5MHFDzmt8lDrlPyf3ONV6Qx+usNSIO8QEAdMsjuID9JR 4voQ== X-Received: by 10.68.203.226 with SMTP id kt2mr13053136pbc.141.1421321669950; Thu, 15 Jan 2015 03:34:29 -0800 (PST) Original-Received: from localhost (ppp118-209-63-224.lns20.mel4.internode.on.net. [118.209.63.224]) by mx.google.com with ESMTPSA id z14sm1271561pdl.82.2015.01.15.03.34.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Jan 2015 03:34:28 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:181289 Archived-At: Vaidheeswaran writes: > The 'p' and 'n' commands (also bound to C-x [ and and C-x ])navigate > to prev and next page resply. BUT it leaves me not in the beginning > or end of the page but somewhere in the "middle" of the page. (This > behaviour is very useful in some circumstances. For example, in > inspecting footnotes.) > > That said, I would have expected to the canonical behaviour of the > above commands to leave me at the beginning of page or end of page. > (i.e., above commands followed up with '<' and '>') This has been an issue for me also; i've addressed it via the following advice: (defadvice doc-view-next-page (after doc-view-next-page-move-to-top activate) "After moving to next page, move to top of page." (image-set-window-vscroll 0)) (defadvice doc-view-previous-page (after doc-view-previous-page-move-to-bottom activate) "After moving to previous page, move to bottom of page." (image-set-window-vscroll (+ 2 (/ (window-height) 2)))) Alexis.