Changeset - c584e55ee1e7
[Not reviewed]
0 2 0
Sergey Pashinin - 13 years ago 2013-05-07 02:26:32
sergey@pashinin.com
new var wg-restore-remote-buffers - restore remote dirs or not
2 files changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/workgroups-specialbufs.el
Show inline comments
 
@@ -4,26 +4,27 @@
 
;; TODO: These could be a little more thorough
 
;;
 

	
 
(require 'dflet)
 
(require 'workgroups-misc)
 

	
 
;; Dired
 

	
 
(defun wg-deserialize-dired-buffer (buf)
 
  "Deserialize Dired buffer."
 
  (wg-dbind (this-function params) (wg-buf-special-data buf)
 
    (let ((dir (car params)))
 
      (if (file-exists-p dir)
 
          (dired dir))
 
      (if (or wg-restore-remote-buffers (not (wg-is-file-remote dir)))
 
          (if (file-exists-p dir)
 
              (dired dir)))
 
      (current-buffer))))
 

	
 
(defun wg-serialize-dired-buffer (buffer)
 
  "Serialize Dired buffer."
 
  (with-current-buffer buffer
 
    (when (eq major-mode 'dired-mode)
 
      (list 'wg-deserialize-dired-buffer
 
            (wg-take-until-unreadable (list (or (buffer-file-name) default-directory)))
 
            ))))
 

	
 
;; Info buffer serdes
 

	
src/workgroups-variables.el
Show inline comments
 
@@ -231,24 +231,32 @@ function must return the restored Emacs buffer object.
 

	
 
See the definitions of the functions in this list for examples of
 
how to write your own."
 
  :type 'alist
 
  :group 'workgroups)
 

	
 
(defcustom wg-default-buffer "*scratch*"
 
  "Buffer made visible a window when the window's actual buffer
 
can't be restored.  Also used when a blank workgroup is created."
 
  :type 'string
 
  :group 'workgroups)
 

	
 
;; What to restore:
 

	
 
(defcustom wg-restore-remote-buffers t
 
  "nil means do not restore buffers that get \"t\" with
 
`wg-is-file-remote'"
 
  :type 'boolean
 
  :group 'workgroups)
 

	
 
(defcustom wg-restore-associated-buffers t
 
  "Non-nil means restore all buffers associated with the
 
workgroup on workgroup restore."
 
  :type 'boolean
 
  :group 'workgroups)
 

	
 
(defcustom wg-restore-frame-position nil
 
  "Non-nil means restore frame position on workgroup restore."
 
  :type 'boolean
 
  :group 'workgroups)
 

	
 
(defcustom wg-restore-scroll-bars t
0 comments (0 inline, 0 general)