help-emacs-windows
[Top][All Lists]
Advanced

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

RE: [h-e-w] Re: split-window-recent


From: Nascif Abousalh-Neto
Subject: RE: [h-e-w] Re: split-window-recent
Date: Mon, 19 May 2003 14:19:55 -0400

No, not really. I don't want to keep splitting the most recent window, but to have two and only two windows.
This function is meant to be a replacement for C-x 2.

Thanks anyway,
        Nascif


> -----Original Message-----
> From: Klaus Berndl [mailto:address@hidden]
> Sent: Monday, May 19, 2003 11:24 AM
> To: address@hidden
> Subject: [h-e-w] Re: split-window-recent
>
>
> On Fri, 16 May 2003, Nascif Abousalh-Neto wrote:
>
> > 
> > 
> >  Hi all,         I use the following command bound to C-x 2
> (according
> > to my  notes the code was created by Colin Walters, thanks!)
> > 
> >  (defun split-window-recent ()
> >    "Split the current window, and show the next most recently used 
> > buffer in the newly created window."
> >    (interactive)
> >    (split-window)
> >    (let ((nextbuf (caddr (buffer-list))))
> >      (when nextbuf
> >        (show-buffer (next-window (selected-window))
> >                     nextbuf))))
> > 
> >  It is quite nice 90% of the time, but every now and then
> it selects
> > the  minibuffer buffer into the new window - which is clearly an
> > annoyance. I  would like to test if the "nextbuf" buffer is the
> > minibuffer, but there  seems to be no "minibuffer-p" or equivalent
> > test predicate (on GNU Emacs  21.2).
>
> Ok, here comes a new version of split-window-recent which is
> IMHO more cleaner and does also what you want:
>
> (defun split-window-recent ()
>   (interactive)
>   (split-window)
>   (show-buffer (next-window (selected-window))
>                (other-buffer)))
>
> Is this what you want?
> Klaus
>
>
> > 
> >  Any ideas?
> >  TIA,
> >          Nascif
> --
> Klaus Berndl                  mailto: address@hidden
> sd&m AG                               http://www.sdm.de
> software design & management 
> Thomas-Dehler-Str. 27, 81737 München, Germany
> Tel +49 89 63812-392, Fax -220
>
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]