|
From: | David Reitter |
Subject: | Re: menu-bar: disable items when no frame visible |
Date: | Sat, 24 Dec 2005 23:59:24 +0100 |
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))))
[Prev in Thread] | Current Thread | [Next in Thread] |