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

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



Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> 
> In [emacs-w3m : No.12274] Katsumi Yamaoka wrote:
> > Could you put up with modifying it locally like this?
> 
> > ;; Should be in .emacs, not .emacs-w3m.el
> > (eval-after-load "w3m-util"
> >   '(defalias 'w3m-delete-frames-and-windows 'ignore))
>
> Sorry, no problem on putting this in the ~/.emacs-w3m.el file.
> 
> 


Thanks, your solution is neat and does indeed work!
I think it could be useful, as you said, if it is a toggable w3m option
(like on/off, where the "on" state prevents the deletion of the window used
by w3m when quitting).

I'm a little confused: in emacs what do you call window and what frame?

https://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html

<<When Emacs is started on a graphical display, e.g., on the X Window
System, it occupies a graphical system-level “window”. In this manual, we
call this a frame, reserving the word “window” for the part of the frame
used for displaying a buffer. A frame initially contains one window, but it
can be subdivided into multiple windows (see Windows). A frame normally also
contains a menu bar, tool bar, and echo area.>>

emacs' frame (X system-level "window")
+--------+--------+
| emacs' | emacs' |
| window | window |
|        |        |
+--------+--------+

> > ;; Your patch looks incomplete.  It doesn't prevent the frame
> > ;; deletion if there is a buffers selection window (it launches
> > ;; by `C-c C-s') in the frame.

The window containing the buffer selection (aka w3m-select-buffer) is
deleted quitting w3m as it is supposed to be part of w3m.