From xemacs-m  Fri Jan 10 21:07:36 1997
Received: from dorsey.corp.teradyne.com (dorsey.corp.teradyne.com [131.101.17.251])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id VAA26201 for <xemacs-beta@xemacs.org>; Fri, 10 Jan 1997 21:07:35 -0600 (CST)
Received: from kiki.icd.teradyne.com (kiki.icd.teradyne.com [131.101.1.30]) by dorsey.corp.teradyne.com (8.7.1/8.7.1) with ESMTP id WAA10901 for <xemacs-beta@xemacs.org>; Fri, 10 Jan 1997 22:07:03 -0500 (EST)
Received: from spacely.icd.teradyne.com (spacely.icd.teradyne.com [131.101.10.9]) by kiki.icd.teradyne.com (8.7.1/8.7.1) with SMTP id WAA10023 for <xemacs-beta@xemacs.org>; Fri, 10 Jan 1997 22:01:35 -0500 (EST)
Received: from spacely by spacely.icd.teradyne.com (SMI-8.6/SMI-SVR4)
	id WAA01713; Fri, 10 Jan 1997 22:03:50 -0500
Message-Id: <199701110303.WAA01713@spacely.icd.teradyne.com>
X-Mailer: exmh version 2.0beta (patched 1/7/97)
To: XEmacs Beta Mailing List <xemacs-beta@xemacs.org>
Subject: Re: single minibuffer frame 
In-reply-to: georgn's message of Mon, 06 Jan 1997 17:37:22 -0500.
	     <199701062237.RAA00436@detlev.canada.sun.com> 
reply-to: acs@acm.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Fri, 10 Jan 1997 22:03:49 -0500
From: Vinnie Shelton  <shelton@icd.teradyne.com>

Georg Nikodym <georgn@Canada.Sun.COM> wrote:
> So, I'm trying out the single minibuffer frame thing that someone
> posted and I have mixed feelings about it.
> 
> Pro:
> 
>  1. One place to look for messages.
> 
> Con:
> 
>  1. If you make a frame on a different device (like another X display)
>     it also uses the original minibuffer.  This is decidedly uncool
>     when the new frame is at home and the minibuffer is at the
>     office...

Well, you could always set the minibuffer property to t for a given frame.
This would give that frame it's own mb.  It was the reverse that was hard - 
taking away a minibuffer - until this patch.

>  2. Occasionally strange interactions occur (focus automatically
>     changes, then post-command-hook barfs something about window
>     configuration into the *Warning* buffer, etc) which are harmless
>     but annoying.

I didn't notice those, but if you move your mouse out of the window with 
the focus, you have to move the focus back to the minibuffer.  Personally, 
I think this is an XEmacs bug.  It should remember who had the focus.  I 
use focus-follows-mouse, though, so I'll have to think about that a bit.

>  3. Occasionally strange interactions occur that can be harmful.
>     Example, replying to mail using VM/Supercite.  New frame pops up
>     with message stealing focus from minibuffer frame that is
>     prompting for an attribution tag.

I don't use VM, but giacomo boffi reported this one to me.  Dunno what to 
do about it.

>  4. Incoming mail, reported by reportmail, results in focus being
>     stolen from current frame.


> 
> I bring all this up since putting it into the sample.emacs commented
> or otherwise result in hew and cry on the newgroup post release...  I
> think that information on an Epoch style minibuffer belongs in the FAQ
> with all the appropriate warnings...

Seems like a kind of out of the way place for this kind of thing, but if 
that's what the powers that be want, *shrug*.  Anyway, I'm including a 
couple of menu mods which enable one to select/de-select a minibuffer for a 
given frame, and to change the default minibuffer frame.  sample.emacs or 
FAQ, whatever.

vin

====== start of sample code ====

      ;; Add some special customizations to the menubar
      (defun toggle-minibuffer ()
	(if (equal (frame-property (selected-frame) 'minibuffer) t)

	    ;; frame has a minibuffer, so remove it
	    ;; unfortunately, we must delete and redraw the frame
	    (let ((fp (frame-properties (selected-frame)))
		  (buf (current-buffer)))
	      (delete-frame)
	      (select-frame
	       (make-frame (plist-put
			    (plist-remprop
			     (plist-remprop fp 'window-id) 'minibuffer)
			    'minibuffer nil)))
	      (switch-to-buffer buf))

	  ;; no minibuffer so add one
	  (set-frame-property (selected-frame) 'minibuffer t)))

      (add-menu-button '("Options")
		       ["Toggle minibuffer"
			(toggle-minibuffer)
			:style toggle
			:active (not (equal (selected-frame)
					    default-minibuffer-frame))
			:selected (equal
				   (frame-property (selected-frame) 'minibuffer)
				   t)]
		       "Save Options")
      (add-menu-button '("Options")
		       ["Default minibuffer here"
			(setq default-minibuffer-frame (selected-frame))
			:style toggle
			:active (let ((mbf (frame-property
					   (selected-frame) 'minibuffer)))
				  (or (equal mbf (selected-frame))
				      (equal mbf t)))
			:selected (equal (selected-frame)
					 default-minibuffer-frame)]
		       "Save Options")
      (add-menu-button '("Options")
		       ["------" nil nil]
		       "Save Options")



