all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vaidheeswaran <vaidheeswaran.chinnaraju@gmail.com>
To: emacs-devel@gnu.org
Cc: emacs-devel@gnu.org
Subject: Re: Page navigation in doc-view.el
Date: Sun, 18 Jan 2015 13:39:50 +0530	[thread overview]
Message-ID: <54BB6A4E.3020707@gmail.com> (raw)
In-Reply-To: <jwviog8uj5u.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

On Thursday 15 January 2015 09:35 PM, Stefan Monnier wrote:
> I think it would make sense to make `n' jump to the beginning of the
> next page (and `p' go to the bottom of the previous page) when
> doc-view-continuous is non-nil.
>
> For M-g M-g, maybe as well (again conditional on doc-view-continuous).

I am attaching a patch.  Fyi, I have queued up an assignment request 
already and I am waiting for a response.

> Of course, I also think that doc-view-continuous should ideally render
> all the pages at the same time in the buffer (stacked vertically), so
> you can scroll through them with the usual scrolling commands, but that
> will take a good bit more work.

Ok.


[-- Attachment #2: 0001-Fix-page-navigation-when-doc-view-continuous-is-nil.patch --]
[-- Type: text/x-patch, Size: 1259 bytes --]

From f72775037ecb8ed9dadbe0775e969e90663dd86f Mon Sep 17 00:00:00 2001
From: Vaidheeswaran C <vaidheeswaran.chinnaraju@gmail.com>
Date: Sun, 18 Jan 2015 13:29:04 +0530
Subject: [PATCH] Fix page navigation when `doc-view-continuous' is nil.

---
 lisp/doc-view.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 0e63d37..21a0883 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -527,6 +527,7 @@ Typically \"page-%s.png\".")
                  (format doc-view--image-file-pattern page)
                  (doc-view--current-cache-dir))))
       (doc-view-insert-image file :pointer 'arrow)
+      (unless doc-view-continuous (image-bob))
       (when (and (not (file-exists-p file))
                  doc-view--current-converter-processes)
         ;; The PNG file hasn't been generated yet.
@@ -553,7 +554,8 @@ Typically \"page-%s.png\".")
 (defun doc-view-previous-page (&optional arg)
   "Browse ARG pages backward."
   (interactive "p")
-  (doc-view-goto-page (- (doc-view-current-page) (or arg 1))))
+  (doc-view-goto-page (- (doc-view-current-page) (or arg 1)))
+  (unless doc-view-continuous (image-eob)))
 
 (defun doc-view-first-page ()
   "View the first page."
-- 
1.7.2.5


      reply	other threads:[~2015-01-18  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-15 11:22 Page navigation in doc-view.el Vaidheeswaran
2015-01-15 11:34 ` Alexis
2015-01-15 11:43   ` Vaidheeswaran
2015-01-15 14:54 ` Stefan Monnier
2015-01-15 15:14   ` Vaidheeswaran C
2015-01-15 16:05     ` Stefan Monnier
2015-01-18  8:09       ` Vaidheeswaran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54BB6A4E.3020707@gmail.com \
    --to=vaidheeswaran.chinnaraju@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.