From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dnquark Newsgroups: gmane.emacs.help Subject: How to make display-buffer automatically focus (e.g. for help buffers) Date: Mon, 13 Jul 2009 04:12:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247485249 16443 80.91.229.12 (13 Jul 2009 11:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jul 2009 11:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 13 13:40:42 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 1MQJth-0005WL-IE for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 13:40:41 +0200 Original-Received: from localhost ([127.0.0.1]:44654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQJtg-00011a-Vj for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Jul 2009 07:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!d23g2000vbm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 14 Original-NNTP-Posting-Host: 98.223.64.197 Original-X-Trace: posting.google.com 1247483555 1887 127.0.0.1 (13 Jul 2009 11:12:35 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 13 Jul 2009 11:12:35 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d23g2000vbm.googlegroups.com; posting-host=98.223.64.197; posting-account=nQKzDwoAAADiNnsVsJOw54VLeNKCeQkD User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:170825 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:66022 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. 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? 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...