From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Brockman Newsgroups: gmane.emacs.devel Subject: Re: Should killing a help or compile buffer also delete the window? Date: Mon, 25 Apr 2005 21:37:04 +0200 Message-ID: <87vf6afy1r.fsf@wigwam.deepwood.net> References: <87is2c7mnx.fsf@brockman.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1114457966 11714 80.91.229.2 (25 Apr 2005 19:39:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Apr 2005 19:39:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 25 21:39:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DQ9Ps-00029d-0T for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2005 21:38:48 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQ9VR-0007e1-8R for ged-emacs-devel@m.gmane.org; Mon, 25 Apr 2005 15:44:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DQ9VH-0007dc-WD for emacs-devel@gnu.org; Mon, 25 Apr 2005 15:44:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DQ9VG-0007dE-Gm for emacs-devel@gnu.org; Mon, 25 Apr 2005 15:44:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DQ9VG-0007FH-D7 for emacs-devel@gnu.org; Mon, 25 Apr 2005 15:44:22 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DQ9P5-0006Qv-SD for emacs-devel@gnu.org; Mon, 25 Apr 2005 15:38:00 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DQ9G8-0000cR-Ao for emacs-devel@gnu.org; Mon, 25 Apr 2005 21:28:44 +0200 Original-Received: from c-4db670d5.028-10-67766c2.cust.bredbandsbolaget.se ([213.112.182.77]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2005 21:28:44 +0200 Original-Received: from daniel by c-4db670d5.028-10-67766c2.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Apr 2005 21:28:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 45 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: c-4db670d5.028-10-67766c2.cust.bredbandsbolaget.se X-Face: :&2UWGm>e24)ip~'K@iOsA&JT3JX*v@1-#L)=dUb825\Fwg#`^N!Y*g-TqdS AevzjFJe96f@V'ya8${57/T'"mTd`1o{TGYhHnVucLq!D$r2O{IN)7>.0op_Y`%r;/Q +(]`3F-t10N7NF\.Mm0q}p1:%iqTi:5]1E]rDF)R$9.!,Eu'9K':y9^U3F8UCS1M+A$ 8[[[WT^`$P[vu>P+8]aQMh9giu&fPCqLW2FSsGs User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:AvzBeRCBTGMkJY5KkDc/9f48O60= 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:36386 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36386 Stefan Monnier writes: >> I realize that you can't expect Emacs to know when you are done with a >> window unless you actually tell when. The obvious way to tell when is >> to type `C-x 1' or `C-x 0', but this leaves the temporary buffer >> lingering, which makes me nervous. > > The way Emacs is expected to deal with it, is via the notion of > dedicated windows. When a window is created by display-buffer, it > is sometimes marked as dedicated, so that if the buffer it displays > is killed the window is deleted (and if it's the only window in the > frame, the frame is also deleted). Interesting... I didn't know that. > I think Emacs should be a bit more aggressive about marking > windows dedicated. I see. What are some examples of windows currently marked dedicated? > My locally hacked Emacs has changed it to *always* mark the window > as dedicated. Does this mean that if you type C-h f cd RET C-x man RET chdir RET, you end up with three windows (assuming you started with just one)? I'm not sure whether that would be good or bad; it might just be less annoying, since in a way you would be more in control of your windows. I guess I'd really have to try it for a while. > The problem with that is that you can't switch-to-buffer in a > dedicated window, so I introduced the notion of "softly-dedicated" > which basically says "this window was created to display buffer FOO > and has never displayed anything else". I.e. it's a form of the > `dedicated' flag which does not prevent switch-to-buffer: > instead when doing switch-to-buffer the flag gets set back to nil to > indicate that the wnidow is not dedicated any more. That's exactly the semantics I had in mind! > It works great in my environment, don't know about others's. It sounds just about perfect. Where can I get the patch? :-) -- Daniel Brockman