From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Tabs are ready? Date: Fri, 03 Feb 2012 19:24:20 +0100 Message-ID: <4F2C2654.3010208@gmx.at> References: <87hazaf2mf.fsf@mail.jurta.org> <4F2A6EBD.6050800@gmx.at> <87ipjprm18.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1328293540 17529 80.91.229.3 (3 Feb 2012 18:25:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Feb 2012 18:25:40 +0000 (UTC) Cc: Alin Soare , Emacs Dev To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 03 19:25:38 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RtNpI-0003Cm-2U for ged-emacs-devel@m.gmane.org; Fri, 03 Feb 2012 19:25:36 +0100 Original-Received: from localhost ([::1]:39153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtNpH-0006Fv-80 for ged-emacs-devel@m.gmane.org; Fri, 03 Feb 2012 13:25:35 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:51276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtNpE-0006Fq-Jz for emacs-devel@gnu.org; Fri, 03 Feb 2012 13:25:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtNpD-0005rX-3A for emacs-devel@gnu.org; Fri, 03 Feb 2012 13:25:32 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:54857) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RtNpC-0005rP-P1 for emacs-devel@gnu.org; Fri, 03 Feb 2012 13:25:31 -0500 Original-Received: (qmail invoked by alias); 03 Feb 2012 18:25:29 -0000 Original-Received: from 62-47-52-177.adsl.highway.telekom.at (EHLO [62.47.52.177]) [62.47.52.177] by mail.gmx.net (mp001) with SMTP; 03 Feb 2012 19:25:29 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19IBlxODM5IZmdPN8RrYuXKvfRrPkxQcilAs/Keqe mGb3UMjYyqkgYL In-Reply-To: <87ipjprm18.fsf@mail.jurta.org> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 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:148153 Archived-At: > Could you please provide examples of using side windows and atomic windows? To make an atomic window use (defun display-buffer-in-atom-window (buffer alist) "Display BUFFER in an atomic window. This function displays BUFFER in a new window that will be combined with an existing window to form an atomic window. If the existing window is already part of an atomic window, add the new window to that atomic window. Operations like `split-window' or `delete-window', when applied to a constituent of an atomic window, are applied atomically to the root of that atomic window. ALIST is an association list of symbols and values. The following symbols can be used. `window' specifies the existing window the new window shall be combined with. Use `window-atom-root' to make the new window a sibling of an atomic window's root. If an internal window is specified here, all children of that window become part of the atomic window too. If no window is specified, the new window becomes a sibling of the selected window. `side' denotes the side of the existing window where the new window shall be located. Valid values are `below', `right', `above' and `left'. The default is `below'. The return value is the new window, nil when creating that window failed." (let ((ignore-window-parameters t) (window-combination-limit t) (window (cdr (assq 'window alist))) (side (cdr (assq 'side alist))) new) (setq window (window-normalize-window window)) ;; Split off new window (when (setq new (split-window window nil side)) ;; Make sure we have a valid atomic window. (window-make-atom (window-parent window)) ;; Display BUFFER in NEW. (display-buffer-record-window 'window new buffer) (window--display-buffer-2 buffer new display-buffer-mark-dedicated) (set-window-prev-buffers new nil) ;; Return NEW. new))) To see the effect try (display-buffer-in-atom-window (current-buffer) '((side . above))) and afterwards do C-x 3 and then C-x 0. I'm currently simplifying the side windows code so I would have to send you the new functions. But I don't have any good documentation ready for them yet. martin