[slime-devel] Re: REPL frame activation

Tobias C. Rittweiler tcr at freebits.de
Tue Aug 19 09:10:43 UTC 2008


Michael Weber <michaelw+slime at foldr.org> writes:

> On Aug 17, 2008, at 13:10 , Helmut Eller wrote:
>
> > Despite the variables you mention, Emacs has already a variable
> > display-buffer-reuse-frames which probably does what
> > slime-switch-to-output-buffer-search-all-frames was supposed to do.
>
> Yes, there are several variables and mechanisms which customize
> buffer/
> window/frame behaviour and they also interact.  It requires a bit of
> fiddling to get the desired outcome.

I have no luck at customizing this through the variables described in
`(elisp)Choosing Window'. And I begin to doubt that these variables are
even meant to let you customize it. They're to customize the way buffers
are _displayed_, but what slime-switch-to-output-buffer does it more,
it's also about setting the input focus, and selecting the window if
appropriate.

If you currently operate within one frame only, and that frame is split
vertically, left displaying the REPL, right your .lisp buffer, and
within your .lisp buffer you press C-c C-z, the left window is selected.

What I did a few days ago was to make this behaviour also happen when
having two frames side-by-side, some window in the left frame displaying
the REPL, the right frame displaying .lisp buffers. So I regarded my
work as improving consistency. 

What I want is the following behaviour:

 (let ((repl-window (get-buffer-window repl-buffer t)))
   (if repl-window
       (progn (select-frame-set-input-focus (window-frame repl-window))
              (select-window repl-window))
     (pop-to-buffer repl-buffer t)))

Setting display-buffer-reuse-frames to t results in C-c C-z being a NOP
because the REPL window is already displayed in a frame, but the window
within that frame isn't selected and input focus isn't updated
accordingly.

I also tried to adapt special-display-regexps, but the function I
specified to be used for displaying REPL buffer doesn't seem to be
invoked by the pop-to-buffers in the current implementation of C-c C-z.

Help greatly appreciated,

  -T.




More information about the slime-devel mailing list