emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 14500c8 1/2: * lisp/doc-view.el: Add some comments


From: Stefan Monnier
Subject: [Emacs-diffs] master 14500c8 1/2: * lisp/doc-view.el: Add some comments about desktop support
Date: Thu, 05 Feb 2015 16:02:16 +0000

branch: master
commit 14500c83b8e4ea20efdc3ea32499d2fb2e0d9253
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/doc-view.el: Add some comments about desktop support
---
 lisp/doc-view.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 0e63d37..b718f1d 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1685,6 +1685,9 @@ If BACKWARD is non-nil, jump to the previous match."
 ;; desktop.el integration
 
 (defun doc-view-desktop-save-buffer (_desktop-dirname)
+  ;; FIXME: This is wrong, since this info is per-window but we only do it once
+  ;; here for the buffer.  IOW it should be saved via something like
+  ;; `window-persistent-parameters'.
   `((page . ,(doc-view-current-page))
     (slice . ,(doc-view-current-slice))))
 
@@ -1695,8 +1698,13 @@ If BACKWARD is non-nil, jump to the previous match."
   (let ((page  (cdr (assq 'page misc)))
        (slice (cdr (assq 'slice misc))))
     (desktop-restore-file-buffer file name misc)
+    ;; FIXME: We need to run this code after displaying the buffer.
     (with-selected-window (or (get-buffer-window (current-buffer) 0)
                              (selected-window))
+      ;; FIXME: This should be done for all windows restored that show
+      ;; this buffer.  Basically, the page/slice should be saved as
+      ;; window-parameters in the window-state(s) and then restoring this
+      ;; window-state should call us back (to interpret/use those parameters).
       (doc-view-goto-page page)
       (when slice (apply 'doc-view-set-slice slice)))))
 



reply via email to

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