From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: menu-bar: disable items when no frame visible Date: Sat, 24 Dec 2005 23:59:24 +0100 Message-ID: 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 (Apple Message framework v746.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1135465216 1889 80.91.229.2 (24 Dec 2005 23:00:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2005 23:00:16 +0000 (UTC) Cc: Emacs-Devel ' Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 25 00:00:15 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 1EqIN1-0005XG-9B for ged-emacs-devel@m.gmane.org; Sun, 25 Dec 2005 00:00:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EqIO8-0006n4-ON for ged-emacs-devel@m.gmane.org; Sat, 24 Dec 2005 18:01:20 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EqINd-0006gi-Q8 for emacs-devel@gnu.org; Sat, 24 Dec 2005 18:00:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EqINb-0006fU-Dp for emacs-devel@gnu.org; Sat, 24 Dec 2005 18:00:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EqINa-0006fO-T5 for emacs-devel@gnu.org; Sat, 24 Dec 2005 18:00:46 -0500 Original-Received: from [66.249.92.197] (helo=uproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EqIN8-0005OG-HD for emacs-devel@gnu.org; Sat, 24 Dec 2005 18:00:18 -0500 Original-Received: by uproxy.gmail.com with SMTP id u2so283890uge for ; Sat, 24 Dec 2005 14:59:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=t963Et4pq9Ss96CrLwf9F4wi5EPKoj8BGiG7XQpmvhEunjErZP3faVvJpN4UAPFEArd0ojtm2/1rzBx53lWX/ZtiHCAIsqzi4LKmVtzHHzzQstwysn6MtJq3ln69WYH5t5X6u5MYjtxldGNPNF5GVKeEIkau4tjrNUTIH6asGF0= Original-Received: by 10.66.224.6 with SMTP id w6mr1399169ugg; Sat, 24 Dec 2005 14:59:34 -0800 (PST) Original-Received: from ?217.247.130.147? ( [217.247.130.147]) by mx.gmail.com with ESMTP id w40sm2166022ugc.2005.12.24.14.59.29; Sat, 24 Dec 2005 14:59:34 -0800 (PST) In-Reply-To: <87slsipb4c.fsf@jurta.org> Original-To: Juri Linkov X-Mailer: Apple Mail (2.746.2) 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:48337 Archived-At: On 24 Dec 2005, at 21:07, Juri Linkov wrote: >> (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. Doesn't open new frames when you find-file or, in general, during switch-to-buffer. Instead, it opens new frames for *Completions* etc, which is very annoying and not what I find useful. 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. 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. The behavior seems to be pretty much against the spirit of display-buffer, maybe you could consider it a bug... (maybe only in the Carbon port, haven't checked this.) I remember reading somewhere that the system may itself select new frames, and Emacs will accept that. Fair enough, but I find my display-buffer function rather useful. (defun aquamacs-display-buffer (&rest args) (let ((display-buffer-function nil)) (if (and one-buffer-one-frame (open-in-other-frame-p (car args))) (let ((pop-up-frames t) (sframe (selected-frame)) (swin (selected-window))) (let ((ret (apply (function display-buffer) args))) ;; make sure the old frame stays the selected one (select-frame sframe) (select-window swin) ret)) (apply (function display-buffer) args))))