From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: How to make display-buffer automatically focus (e.g. for help buffers) Date: Mon, 13 Jul 2009 17:10:03 +0200 Message-ID: <4A5B4E4B.5030504@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247497951 25953 80.91.229.12 (13 Jul 2009 15:12:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 15:12:31 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: dnquark@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 13 17:12:24 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MQNCX-0005xG-My for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 17:12:21 +0200 Original-Received: from localhost ([127.0.0.1]:57703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQNCW-0007jj-Os for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 11:12:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQNAS-00074Z-Mw for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 11:10:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQNAN-000729-QF for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 11:10:12 -0400 Original-Received: from [199.232.76.173] (port=52390 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQNAN-000724-Mc for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 11:10:07 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:60219) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MQNAN-0005KG-4x for help-gnu-emacs@gnu.org; Mon, 13 Jul 2009 11:10:07 -0400 Original-Received: (qmail invoked by alias); 13 Jul 2009 15:10:04 -0000 Original-Received: from 62-47-53-142.adsl.highway.telekom.at (EHLO [62.47.53.142]) [62.47.53.142] by mail.gmx.net (mp064) with SMTP; 13 Jul 2009 17:10:04 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18uAjJYm1Mugin0mvcvOyZ8xhOB1Awbiq+IU7E1Uc NvBO9rtoylUpGq User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) Original-References: e5576edf-91a7-48a8-a554-4a3f0e2b35a6@d23g2000vbm.googlegroups.com X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66034 Archived-At: > 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