emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Page navigation in doc-view.el


From: Alexis
Subject: Re: Page navigation in doc-view.el
Date: Thu, 15 Jan 2015 22:34:23 +1100

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]