unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ian D <dunni@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: Doc View Page Problems
Date: Wed, 16 Apr 2014 15:27:06 -0400	[thread overview]
Message-ID: <8761m95b3p.fsf@gnu.org> (raw)
In-Reply-To: <jwv38hdxi4e.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 16 Apr 2014 14:09:10 -0400")

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>         Since image-mode sets up the `t' entry itself, it could be
>>         possible to continuously update this every time another entry is
>>         updated, if that's what you're suggesting.
>
> Yes, that's what I'm suggesting.
>
        Alright.  I've got the full patch, and updated ChangeLog entry.

Ian D

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 4254485..4ff78b5 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.")
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index de6bb85..98fc385 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -90,6 +90,9 @@ otherwise it defaults to t, used for times when the buffer is not displayed."
 
 (defun image-mode-window-put (prop val &optional winprops)
   (unless (consp winprops) (setq winprops (image-mode-winprops winprops)))
+  (setcdr (assq t image-mode-winprops-alist)
+          (cons (cons prop val)
+                (delq (assq prop (cdr winprops)) (cdr winprops))))
   (setcdr winprops (cons (cons prop val)
                          (delq (assq prop (cdr winprops)) (cdr winprops)))))
 
2014-04-16 Ian Dunn <dunni@gnu.org>

	* doc-view.el (doc-vew-new-window-function): If no window
	  exists, move to the last known page.
	* image-mode.el (image-mode-window-put): Updates the default
	  configuration.



  reply	other threads:[~2014-04-16 19:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=8761m95b3p.fsf@gnu.org \
    --to=dunni@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).