all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Doc View Page Problems
@ 2014-04-15 13:24 Ian D
  2014-04-15 16:51 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Ian D @ 2014-04-15 13:24 UTC (permalink / raw)
  To: emacs-devel

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


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: doc-view.el.patch --]
[-- Type: text/x-diff, Size: 831 bytes --]

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-04-20  3:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 13:24 Doc View Page Problems Ian D
2014-04-15 16:51 ` Stefan Monnier
2014-04-16 13:06   ` Ian D
2014-04-16 14:18     ` Stefan Monnier
2014-04-16 16:01       ` Ian D
2014-04-16 18:09         ` Stefan Monnier
2014-04-16 19:27           ` Ian D
2014-04-17  3:58             ` Stefan Monnier
2014-04-18 20:23             ` Ian D
2014-04-20  2:47               ` Stefan Monnier
2014-04-20  3:10                 ` Ian D

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.