Changeset - e27a41253237
[Not reviewed]
0 1 0
Sergey Pashinin - 11 years ago 2014-09-17 15:17:56
sergey@pashinin.com
garbage collection returned
1 file changed with 8 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/workgroups2.el
Show inline comments
 
@@ -4202,17 +4202,20 @@ nil otherwise."
 
  (dolist (workgroup (wg-workgroup-list))
 
    (awhen (wg-workgroup-selected-frame-wconfig workgroup)
 
      (setf (wg-workgroup-base-wconfig workgroup) it
 
            (wg-workgroup-selected-frame-wconfig workgroup) nil)))
 

	
 
  ;; Garbage collection
 
  ;; https://github.com/pashinin/workgroups2/issues/48
 
  ;;(let ((all-buf-uids (wg-all-buf-uids)))
 
  ;;  (wg-asetf (wg-buf-list)
 
  ;;            (cl-remove-if-not (lambda (uid) (member uid all-buf-uids)) it
 
  ;;                              :key 'wg-buf-uid)))
 

	
 
  ;; Commenting this will cause a constantly growing session file:
 
  ;; (tried to comment this block to solve https://github.com/pashinin/workgroups2/issues/48)
 
  (let ((all-buf-uids (wg-all-buf-uids)))
 
    (wg-asetf (wg-buf-list)
 
              (cl-remove-if-not (lambda (uid) (member uid all-buf-uids)) it
 
                                :key 'wg-buf-uid)))
 

	
 
  (mapc 'wg-workgroup-gc-buf-uids (wg-workgroup-list))  ; Remove buf uids that have no referent in `wg-buf-list'
 
  (mapc 'wg-update-buffer-in-buf-list (wg-buffer-list-emacs)))
 

	
 
(defun wg-save-session-as (filename &optional confirm)
 
  "Write the current session into file FILENAME.
 
This makes the session visit that file, and marks it as not modified.
0 comments (0 inline, 0 general)