From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Window configurations Date: Mon, 10 May 2010 22:16:19 +0300 Organization: JURTA Message-ID: <87vdav4vx5.fsf@mail.jurta.org> References: <4BB4CF6B.2000007@alice.it> <87vdbhgqgd.fsf@mail.jurta.org> <828BB36311A84C43B96D1F2A559DACAE@us.oracle.com> <87d3xo662u.fsf@mail.jurta.org> <69D40D69CC6F4982A8E91D8D8F0F494F@us.oracle.com> <87r5m4hz39.fsf@mail.jurta.org> <4BD40821.70808@gmx.at> <87zl0rtmqy.fsf@mail.jurta.org> <871vdu6qn5.fsf@mail.jurta.org> <87bpcv1wvt.fsf@mail.jurta.org> <4BE13828.2030609@gmx.at> <87vdb2qo82.fsf@mail.jurta.org> <4BE27C17.3030005@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1273519086 13621 80.91.229.12 (10 May 2010 19:18:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 May 2010 19:18:06 +0000 (UTC) Cc: Ken Hori , Emacs To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 10 21:18:04 2010 connect(): No such file or directory Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OBYUB-0000zH-Te for ged-emacs-devel@m.gmane.org; Mon, 10 May 2010 21:18:01 +0200 Original-Received: from localhost ([127.0.0.1]:58921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBYU0-0006TS-Ex for ged-emacs-devel@m.gmane.org; Mon, 10 May 2010 15:17:40 -0400 Original-Received: from [140.186.70.92] (port=35880 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBYTs-0006QV-Ee for emacs-devel@gnu.org; Mon, 10 May 2010 15:17:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBYTi-0008Ro-N2 for emacs-devel@gnu.org; Mon, 10 May 2010 15:17:25 -0400 Original-Received: from smtp-out1.starman.ee ([85.253.0.3]:34585 helo=mx1.starman.ee) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBYTi-0008RU-Ds for emacs-devel@gnu.org; Mon, 10 May 2010 15:17:22 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.69.38.cable.starman.ee [82.131.69.38]) by mx1.starman.ee (Postfix) with ESMTP id 5CF553F413F; Mon, 10 May 2010 22:17:18 +0300 (EEST) In-Reply-To: <4BE27C17.3030005@gmx.at> (martin rudalics's message of "Thu, 06 May 2010 10:21:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:124678 Archived-At: > What I really want is some sort of function `set-window-configuration' > could call whenever it encounters a window with a dead buffer. As a > fallback it then would try your (2) first and (4) if the window can't be > deleted. Thinking more about this, I believe now this function should be like `view-mode-exit': (view-mode-exit &optional RETURN-TO-ALIST EXIT-ACTION ALL-WIN) Exit View mode in various ways, depending on optional arguments. RETURN-TO-ALIST, EXIT-ACTION and ALL-WIN determine what to do after exit. EXIT-ACTION is nil or a function that is called with current buffer as argument. RETURN-TO-ALIST is an alist that, for some of the windows displaying the current buffer, maintains information on what to do when exiting those windows. If ALL-WIN is non-nil or the variable `view-exits-all-viewing-windows' is non-nil, view-mode-exit attempts to restore all windows showing the current buffer to their old state. Otherwise, only the selected window is affected (provided it is on RETURN-TO-ALIST). Elements of RETURN-TO-ALIST must have the format (WINDOW OLD-WINDOW . OLD-BUF-INFO) where WINDOW is a window displaying the current buffer and OLD-WINDOW is either nil or a window to select after viewing. OLD-BUF-INFO provides information on what to do with WINDOW and may be one of: 1) nil Do nothing. 2) t Delete WINDOW and, if it is the only window and `view-remove-frame-by-deleting' is non-nil, its frame. 3) (OLD-BUF START POINT) Display buffer OLD-BUF with displayed text starting at START and point at POINT in WINDOW. 4) quit-window Do `quit-window' in WINDOW. 5) keep-frame Like case 2) but do not delete the frame. If one of the WINDOW in RETURN-TO-ALIST is the selected window and the corresponding OLD-WINDOW is a live window, then select OLD-WINDOW. -- Juri Linkov http://www.jurta.org/emacs/