[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Doc View Page Problems
From: |
Ian D |
Subject: |
Doc View Page Problems |
Date: |
Tue, 15 Apr 2014 09:24:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) |
Emacs Developers,
I've been having problems with DocView for quite some time.
While the buffers were off screen, the document I'd be viewing
would reset to page one. I'm sure I'm not the only one having
this problem, but I do have a solution.
It turns out the problem comes from when all of the windows in
which a document was being viewed are gone, there is no way to
keep track of the location of the document. I've attached a
patch that will solve this problem. What my fix does is updates
the default entry in `image-mode-winprops-alist' (the one with
key `t') to keep track of the current page. Then when there are
no more windows to use, it uses the last known page.
I hope this helps others who have been having this problem.
Ian D
P.S. I apologize if the bug mailing list would have been the
appropriate mailing list to which to send this.
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 09d5925..0e8f511 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -336,7 +336,7 @@ of the page moves to the previous page."
;; Don't do it if there's a conversion is running, since in that case, it
;; will be done later.
(with-selected-window (car winprops)
- (doc-view-goto-page 1)))))
+ (doc-view-goto-page (image-mode-window-get 'page t))))))
(defvar-local doc-view--current-files nil
"Only used internally.")
@@ -502,6 +502,7 @@ Typically \"page-%s.png\".")
(setq page len)))
(force-mode-line-update) ;To update `current-page'.
(setf (doc-view-current-page) page
+ (image-mode-window-get 'page t) page ;; Update the default page.
(doc-view-current-info)
(concat
(propertize
- Doc View Page Problems,
Ian D <=
- Re: Doc View Page Problems, Stefan Monnier, 2014/04/15
- Re: Doc View Page Problems, Ian D, 2014/04/16
- Re: Doc View Page Problems, Stefan Monnier, 2014/04/16
- Re: Doc View Page Problems, Ian D, 2014/04/16
- Re: Doc View Page Problems, Stefan Monnier, 2014/04/16
- Re: Doc View Page Problems, Ian D, 2014/04/16
- Re: Doc View Page Problems, Ian D, 2014/04/18
- Re: Doc View Page Problems, Stefan Monnier, 2014/04/19
- Re: Doc View Page Problems, Ian D, 2014/04/19
- Re: Doc View Page Problems, Stefan Monnier, 2014/04/23