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

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



In [emacs-w3m : No.12273] Mirko M. wrote:
> 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.

Not *always*.  That behavior is just what I intended to design.
That is, the frame, that you raise in order to do something using
emacs-w3m, should get unnecessary when you quit the session.  But
the frame deletion will not necessarily take place; it doesn't do
so if there is at least a window that is not for emacs-w3m because
it is assumed to be opened purposely by a user.  Though emacs-w3m
isn't aware of it if you close the window that you once opened.

Emacs-w3m is going on this way for years, so changing the behavior
will probably confuse people.  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))

Otherwise a better solution for it will be welcome if it is
customizable by a user, really useful for not a few people and
coded well-mannered.

;; 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.