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

Remove cruft that was causing bad window config [PATCH]



In testing, it became clear that when one selected to load a prior
session, if one was in w3m-fb-mode, the session-select window would not
close, and the new buffers would load in that window.

The culprit seems to have been `w3m-session-select-wincfg' which is
used, but never set. This seems to be cruft from a feature used in file
`w3m-form.el'. Maybe there was once intent to use it for the session
management window, but it was never done or never completed.

To re-create the bug:

1] quit w3m
2] enable w3m-fb-mode
3] start w3m
4] M-s
5] select a session to load and press <ret>

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3648
diff -u -r1.3648 ChangeLog
--- ChangeLog	16 Feb 2018 06:53:15 -0000	1.3648
+++ ChangeLog	18 Feb 2018 22:02:59 -0000
@@ -1,3 +1,9 @@
+2018-02-18  Boruch Baum  <boruch_baum@xxxxxxx>
+
+	* (w3m-session-select-quit): Remove cruft: w3m-session-select-wincfg is
+	used, but never set. This caused a bad (nil) window configuration to be
+	used when exiting a session-select window in w3m-fb mode.
+
 2018-02-16  Katsumi Yamaoka  <yamaoka@xxxxxxx>

 	* w3m-fb.el (w3m-fb-mode, w3m-fb-delete-frame-kill-buffers):
Index: w3m-session.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-session.el,v
retrieving revision 1.42
diff -u -r1.42 w3m-session.el
--- w3m-session.el	16 Feb 2018 06:53:15 -0000	1.42
+++ w3m-session.el	18 Feb 2018 22:02:59 -0000
@@ -476,9 +478,7 @@
     (setq w3m-session-select-mode-map map)))

 ;;; Local variables
-(defvar w3m-session-select-wincfg nil)
 (defvar w3m-session-select-sessions nil)
-(make-variable-buffer-local 'w3m-session-select-wincfg)
 (make-variable-buffer-local 'w3m-session-select-sessions)

 (defun w3m-session-select-mode (&optional sessions)
@@ -657,11 +657,9 @@
     (let ((num w3m-session-group-open))
       (setq w3m-session-group-open nil)
       (w3m-session-select-list-all-sessions))
-   (let ((buffer (current-buffer))
- 	(wincfg w3m-session-select-wincfg))
+   (let ((buffer (current-buffer)))
      (or (one-window-p) (delete-window))
-     (kill-buffer buffer)
-     (set-window-configuration wincfg))))
+     (kill-buffer buffer))))

 (defun w3m-session-select-select ()
   "Select the session."