From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: menu-bar: disable items when no frame visible Date: Sun, 25 Dec 2005 16:54:04 +0000 (UTC) Message-ID: <873oxqb0sa.fsf-monnier+emacs__49076.4621565633$1135529644$gmane$org@gnu.org> References: <708F3D2D-A87C-4F80-BC27-171D82653F4D@gmail.com> <069BF3EB-C5E4-4042-91E9-0DFB37C58E99@gmail.com> <87u0d3cu9y.fsf@jurta.org> <87y82b7evb.fsf@jurta.org> <9F80EEEC-3EDF-47B5-9837-2091650A8C5D@gmail.com> <87slsipb4c.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135529644 17287 80.91.229.2 (25 Dec 2005 16:54:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Dec 2005 16:54:04 +0000 (UTC) Cc: Juri Linkov , Emacs-Devel ' Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 25 17:54:02 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EqZ8B-0004Rt-MZ for ged-emacs-devel@m.gmane.org; Sun, 25 Dec 2005 17:53:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EqZ9L-0003z2-Ln for ged-emacs-devel@m.gmane.org; Sun, 25 Dec 2005 11:55:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EqZ92-0003yx-3l for emacs-devel@gnu.org; Sun, 25 Dec 2005 11:54:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EqZ90-0003yC-5s for emacs-devel@gnu.org; Sun, 25 Dec 2005 11:54:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EqZ90-0003y9-2u for emacs-devel@gnu.org; Sun, 25 Dec 2005 11:54:50 -0500 Original-Received: from [209.226.175.54] (helo=tomts10-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EqZ8f-0003NA-QN for emacs-devel@gnu.org; Sun, 25 Dec 2005 11:54:30 -0500 Original-Received: from alfajor ([67.71.26.92]) by tomts10-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051225165336.OPBB14963.tomts10-srv.bellnexxia.net@alfajor>; Sun, 25 Dec 2005 11:53:36 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id C89CBD7643; Fri, 2 Jan 1970 03:32:05 -0500 (EST) Original-To: David Reitter Original-Date: Fri, 02 Jan 1970 03:32:05 -0500 In-Reply-To: (David Reitter's message of "Sat, 24 Dec 2005 23:59:24 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48352 Archived-At: >>> (This made sense in my own setup because I have advised switch-to- >>> buffer to show most buffers in a new frame, so I don't usually get >>> that error.) >> >> This looks like what `pop-up-frames' is intended for. Except that switch-to-buffer doesn't pay attention to it. That's one of the main reasons why switch-to-buffer should be avoided in elisp code and used "only" via C-x b. > I want much more fine-control over what is opened where. I have a mode > called `one-buffer-one-frame' which will display newly visited files in > separate frames and generally create new frames for things, with the > exception of stuff like completions buffers or other buffers, usually *...* > ones. A more compatible way to do this (better than to advise > switch-to-buffer and use my own display-buffer function) would be much > appreciated, of course. For the switch-to-buffer advice, the only alternative I know is to fix the source code :-(. But in order to show *...* elsewhere, all you need should be something like (add-to-list 'special-display-regexp '("\\*.*\\*" (same-frame . t))) > Besides, display-buffer is documented to show the buffer in a new window > without selecting it. When pop-up-frames is non-nil, it creates a new > frame, but selects it, which is annoying when you want to, e.g. display > a quick *Help* but keep working in the original frame. That's a bug. Stefan