[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: quit-window
From: |
martin rudalics |
Subject: |
Re: quit-window |
Date: |
Tue, 25 Oct 2011 15:01:46 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> Take this:
>
> (defun ibuffer-quit ()
> "Quit this `ibuffer' session.
> Try to restore the previous window configuration if
> `ibuffer-restore-window-config-on-quit' is non-nil."
> (interactive)
> (if ibuffer-restore-window-config-on-quit
> (progn
> (bury-buffer)
> (unless (= (count-windows) 1)
> (set-window-configuration ibuffer-prev-window-config)))
> (bury-buffer)))
The problem is already in `ibuffer' itself:
(setq ibuffer-prev-window-config (current-window-configuration))
(let ((buf (get-buffer-create (or name "*Ibuffer*"))))
(if other-window-p
(funcall (if noselect (lambda (buf) (display-buffer buf t))
#'pop-to-buffer) buf)
(funcall (if noselect #'display-buffer #'switch-to-buffer) buf))
Saving the window configuration doesn't make sense if one of the
funcalls makes a new frame.
> Here I am wondering if the same couldn't be achieved by a call to
> (the new and improved) `quit-window'.
I hope it does. But this is something users of ibuffer should try
first.
> Something like
>
> (defun Info-exit (kill)
KILL should be optional here.
martin
- quit-window, Christoph Scholtes, 2011/10/22
- Re: quit-window, Chong Yidong, 2011/10/23
- Re: quit-window, Christoph Scholtes, 2011/10/23
- Re: quit-window, Chong Yidong, 2011/10/23
- Re: quit-window, Richard Stallman, 2011/10/24
- Re: quit-window, Eli Zaretskii, 2011/10/24
- Re: quit-window, martin rudalics, 2011/10/24
- Re: quit-window, Richard Stallman, 2011/10/25
- Re: quit-window, Christoph Scholtes, 2011/10/24
- Re: quit-window,
martin rudalics <=
- Re: quit-window, Richard Stallman, 2011/10/25
Re: quit-window, martin rudalics, 2011/10/23
- Re: quit-window, Juri Linkov, 2011/10/23
- Re: quit-window, Christoph Scholtes, 2011/10/23
- Re: quit-window, martin rudalics, 2011/10/23
- Re: quit-window, Juri Linkov, 2011/10/24
- Re: quit-window, Chong Yidong, 2011/10/24
- Re: quit-window, Juri Linkov, 2011/10/25
Re: quit-window, Christoph Scholtes, 2011/10/23