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: Wed, 04 Sep 2013 16:22:13 -0500 Message-ID: <85ppso1dve.fsf@stephe-leake.org> References: <8561uiclrj.fsf@stephe-leake.org> <5225DB8D.6060709@gmx.at> <858uzcbggs.fsf@stephe-leake.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1378329752 17149 80.91.229.3 (4 Sep 2013 21:22:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Sep 2013 21:22:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 04 23:22:32 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 1VHKX2-00079U-GB for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2013 23:22:32 +0200 Original-Received: from localhost ([::1]:55776 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHKX1-0003Uw-G9 for ged-emacs-devel@m.gmane.org; Wed, 04 Sep 2013 17:22:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHKWs-0003UN-TW for emacs-devel@gnu.org; Wed, 04 Sep 2013 17:22:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHKWl-00089Y-Ox for emacs-devel@gnu.org; Wed, 04 Sep 2013 17:22:22 -0400 Original-Received: from hrndva-omtalb.mail.rr.com ([71.74.56.122]:33717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHKWl-00089M-LS for emacs-devel@gnu.org; Wed, 04 Sep 2013 17:22:15 -0400 X-Authority-Analysis: v=2.0 cv=fJG7LOme c=1 sm=0 a=pgmxNm/W8GNIydqLw4DtNA==:17 a=KflC_vgjhNoA: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=mDV3o1hIAAAA:8 a=A3ZGqVkgpnDcrjJA5IwA:9 a=ITgWvxbI53kA:10 a=Q9BberuImaQA:10 a=pgmxNm/W8GNIydqLw4DtNA==:117 X-Cloudmark-Score: 0 X-Authenticated-User: X-Originating-IP: 70.94.47.220 Original-Received: from [70.94.47.220] ([70.94.47.220:49376] helo=TAKVER) by hrndva-oedge04.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id 82/BB-27973-684A7225; Wed, 04 Sep 2013 21:22:15 +0000 In-Reply-To: (Stefan Monnier's message of "Wed, 04 Sep 2013 15:33:58 -0400") 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:163193 Archived-At: Stefan Monnier writes: >>> `display-buffer' decisions are currently not based on a prefix argument >>> given. >> Right; that's new. I find it very convenient. > > But it's fundamentally broken (the prefix arg is an argument to the > command being run, and the relationship between the command being run > and the call to `display-buffer' can be arbitrary). > IOW it's perfectly fine for personal use but we can't use that in > lisp/window.el. Yes, that makes sense. >>> Maybe we can reconcile your idea with Stefan's proposal to use >>> special prefixes for `display-buffer'-based functions. >> Searching the emacs-devel archives, I found: >> http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00299.html >> http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00481.html >> That doesn't give a very concrete proposal; can provide a better link? > > Make C-x 5 a prefix key which sets display-buffer-overriding-action for > the duration of the next command. Ok; that makes sense as a user interface. Do you have a hint about how to implement it? I've never seen code tied to a prefix, but I'm happy to experiment. > Of course, other such prefixes could be used, such as C-x 4. Right, that would be "other window" (C-x 4 f is `find-file-other-window'), while C-x 5 is "other frame". > And as Martin mentions, we'd want one that can say "display in current > window". That should be no harder to define than C-x 4 or C-x 5. 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. > More generally you could define such a prefix key that lets you specify > a particular window to use in the next command. Right. Designing a UI to let users select a particular window is a challenge. I may think about that later ... -- -- Stephe