From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: managing windows in two frames Date: Sat, 07 Sep 2013 03:49:35 -0500 Message-ID: <85hadx584g.fsf@stephe-leake.org> References: <8561uiclrj.fsf@stephe-leake.org> <5225DB8D.6060709@gmx.at> <858uzcbggs.fsf@stephe-leake.org> <85ppso1dve.fsf@stephe-leake.org> <5229B417.60006@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378543793 19228 80.91.229.3 (7 Sep 2013 08:49:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Sep 2013 08:49:53 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 07 10:49:53 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VIEDJ-0001yZ-4B for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2013 10:49:53 +0200 Original-Received: from localhost ([::1]:41185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIEDI-0000yQ-Qk for ged-emacs-devel@m.gmane.org; Sat, 07 Sep 2013 04:49:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57875) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIEDB-0000yI-A8 for emacs-devel@gnu.org; Sat, 07 Sep 2013 04:49:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VIED5-0004kR-GN for emacs-devel@gnu.org; Sat, 07 Sep 2013 04:49:45 -0400 Original-Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:23953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VIED5-0004jw-CV for emacs-devel@gnu.org; Sat, 07 Sep 2013 04:49:39 -0400 X-Authority-Analysis: v=2.0 cv=V4T/IJbi c=1 sm=0 a=90MK7lSzN9hCuM5ahEFLfw==:17 a=M2z5juievrMA:10 a=yJoioP6_5VwA:10 a=zcTG9qZzcMYA:10 a=o_R75loqY_IA:10 a=9i_RQKNPAAAA:8 a=KGjhK52YXX0A:10 a=Lzix9T0G-1kA:10 a=wgvwWq4Q1FxLhDPC_-YA:9 a=90MK7lSzN9hCuM5ahEFLfw==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 75.87.84.149 Original-Received: from [75.87.84.149] ([75.87.84.149:51130] helo=TAKVER) by hrndva-oedge03.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 08/2F-26119-2A8EA225; Sat, 07 Sep 2013 08:49:38 +0000 In-Reply-To: <5229B417.60006@gmx.at> (martin rudalics's message of "Fri, 06 Sep 2013 12:53:11 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 71.74.56.122 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:163248 Archived-At: martin rudalics writes: >> C-x 6 is available. But display-buffer is not used for displaying a >> buffer in the current window now, so I think this cannot be handled by >> the same mechanism. At least not without major changes. > > `display-buffer-same-window'? Or what am I missing? `find-file' does not call `display-buffer'; `find-file-other-window' does call `display-buffer'. (I just checked by enabling Edebug in display-buffer.) `find-file' calls `switch-to-buffer' which calls `pop-to-buffer'. The same is true for all the other "put a buffer in this window" user level functions I've encountered. `display-buffer-same-window' is an action for `display-buffer'. Ah! We could change the implementation of `find-file' to use `display-buffer' with an action of `display-buffer-same-window'; that action would be changed by prefix C-x 4 or C-x 5. `find-file-other-window' could then be implemented by setting `display-buffer-overriding-action' and calling `find-file'. That would make sense, and should be mostly transparent to users. All the other similar functions would have to be changed in a similar way - I haven't tried to enumerate them. We could implement C-x 4 and 5 for the current uses of `display-buffer' first, and see how people like it. -- -- Stephe