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

quit w3m (w3m-quit) without closing any emacs' window



Hello,

do you know a way to quit w3m without closing any emacs' window?
"M-x w3m-quit" always closes all the windows in emacs' frame, which
sometimes is annoying.

In the meantime, I managed to implement the solution below:

----------

The  function  w3m-quit (w3m.el)  calls  w3m-delete-frames-and-windows
(w3m-util.el), which kills all the windows except one.

In the proposed solution, when w3m quits no window is deleted, and the
window used by w3m is switched to another buffer.

----------

diff -c /root/.emacs.d/elpa/w3m-20131203.1429/w3m-util.el /root/w3m-util.el
*** /root/.emacs.d/elpa/w3m-20131203.1429/w3m-util.el	2014-01-06
16:16:20.000000000 +0100
--- /root/w3m-util.el	2014-01-06 16:18:32.000000000 +0100
***************
*** 798,805 ****
  		       flag))
  		    (delete-frame frame)
  		  (delete-window window))
! 	      (unless one-window-p
! 		(delete-window window)))))))))
  
  
  ;;; Navigation:
--- 798,805 ----
  		       flag))
  		    (delete-frame frame)
  		  (delete-window window))
! 	      ;; do not clear the layout.
! 	      (switch-to-buffer nil))))))))
  
  
  ;;; Navigation:
 
Diff finished.  Mon Jan  6 16:18:45 2014

----------

Thanks,
Mirko M.