[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make display-buffer automatically focus (e.g. for help buffer
From: |
martin rudalics |
Subject: |
Re: How to make display-buffer automatically focus (e.g. for help buffers) |
Date: |
Mon, 13 Jul 2009 17:10:03 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
> I would like to implement the following behavior for buffers that pop
> up when e.g. help is invoked: I want the pop-up buffer to
> automatically take focus.
For help buffers you should be able to do that by customizing
`help-window-select' to t.
> I tried to advise the display-buffer
> function with (other-window 1), but this solution is suboptimal: for
> instance, if I continue browsing help it will be using display-buffer
> but will be reusing its window -- so (other-window 1) makes the
> already selected help window lose focus. Is there a better solution?
The canonical function for this purpose is `pop-to-buffer'. Wherever
`display-buffer' is called, the explicit intention is to _not_ select
the window that command uses.
> In addition: for any buffer that pops up automatically (Help,
> completions, TeX compilation results, etc) I would like to be able to
> create filters based on buffer name and optionally turn on the View
> mode (so that the buffer could be easily searched and/or dismissed by
> pressing 'q'). I searched extensively, but couldn't find a ready-made
> function that would do that...
Most of these buffers should be in View mode and typing `q' should quit
them. Which ones don't?
martin
- Re: How to make display-buffer automatically focus (e.g. for help buffers),
martin rudalics <=