From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel Subject: Re: Any way to prevent window splits for a window or a major-mode Date: Tue, 5 Dec 2017 12:04:51 -0500 Message-ID: References: <5A227DA1.9060200@gmx.at> <5A265E92.3080309@gmx.at> Reply-To: rswgnu@gmail.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113d6c581b95ee055f9ad72e" X-Trace: blaine.gmane.org 1512493638 20028 195.159.176.226 (5 Dec 2017 17:07:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 5 Dec 2017 17:07:18 +0000 (UTC) Cc: emacs-devel To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 05 18:07:15 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eMGgR-0004Xx-BP for ged-emacs-devel@m.gmane.org; Tue, 05 Dec 2017 18:07:03 +0100 Original-Received: from localhost ([::1]:51094 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMGgY-0003y8-MX for ged-emacs-devel@m.gmane.org; Tue, 05 Dec 2017 12:07:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMGeu-0003QK-M3 for emacs-devel@gnu.org; Tue, 05 Dec 2017 12:05:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMGep-0004oL-OR for emacs-devel@gnu.org; Tue, 05 Dec 2017 12:05:28 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMGep-0004o2-FD for emacs-devel@gnu.org; Tue, 05 Dec 2017 12:05:23 -0500 Original-Received: from mail-oi0-f41.google.com ([209.85.218.41]:36186) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eMGep-0002mp-0K for emacs-devel@gnu.org; Tue, 05 Dec 2017 12:05:23 -0500 Original-Received: by mail-oi0-f41.google.com with SMTP id j17so666368oih.3 for ; Tue, 05 Dec 2017 09:05:22 -0800 (PST) X-Gm-Message-State: AJaThX7zERIMopCs5LfzRRbiMXehLj9utbGjxnzDZojiDfoXWijDnF8f f66RYw8F+d34Z8w7KfjNsAj1abdPHWnvyVdzs7U= X-Google-Smtp-Source: AGs4zMYnPu53103UiXiUYFRUC7lSDXOQIHIZW22CwHV0BsAwTBs1E43VakC8HJPbHVd2z4wZu4DfkNHWNVJBO1pUpfc= X-Received: by 10.202.193.3 with SMTP id r3mr17656688oif.167.1512493522062; Tue, 05 Dec 2017 09:05:22 -0800 (PST) Original-Received: by 10.157.1.133 with HTTP; Tue, 5 Dec 2017 09:04:51 -0800 (PST) In-Reply-To: <5A265E92.3080309@gmx.at> X-Gmail-Original-Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:220741 Archived-At: --001a113d6c581b95ee055f9ad72e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 5, 2017 at 3:53 AM, martin rudalics wrote: > > =E2=80=8BThe Treemacs package displays a full-frame height window at > > the left of the frame that can be used to browse directories > > in an outline fashion. It has some features that make it > > attractive at times beyond just using Dired (it also can be > > used in tandem with Dired). > > > > Treemacs uses treemacs-mode for its buffers. So I want any > > window with a buffer in that mode to be non-splittable since > > it is narrow and it doesn't make sense to split it in either > > dimension. > > You might consider two opportunities here: If the treemacs window is > "frame bound", then it's probably best to make it a side window so that > C-x 1 does not delete it and it does not become the sole window of the > frame. =E2=80=8B=E2=80=8B =E2=80=8BIt is frame-bound. I tested display-buffer-in-side-window and that did the trick. Thanks. Is set-window-dedicate-p also needed or does the side window setup take care of that? If you don't want delete-other-windows to delete this window, then also add: (set-window-parameter (selected-window) 'no-delete-other-windows t) Bob --001a113d6c581b95ee055f9ad72e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Dec 5, 20= 17 at 3:53 AM, martin rudalics <rudalics@gmx.at> wrote:
> =E2=80=8BThe Treemacs package displays a full-frame height window a= t
> the left of the frame that can be used to browse directories
> in an outline fashion.=C2=A0 It has some features that make it
> attractive at times beyond just using Dired (it also can be
> used in tandem with Dired).
>
> Treemacs uses treemacs-mode for its buffers.=C2=A0 So I want any
> window with a buffer in that mode to be non-splittable since
> it is narrow and it doesn't make sense to split it in either
> dimension.

You might consider two opportunities here: If the treemacs window is
"frame bound", then it's probably best to make it a side wind= ow so that
C-x 1 does not delete it and it does not become the sole window of the
frame.
=E2=80=8B=E2=80=8B

=E2=80=8BIt is frame-bo= und.=C2=A0 I tested display-buffer-in-side-window
and that did the tri= ck.=C2=A0 Thanks.=C2=A0 Is set-window-dedicate-p
also needed or does the s= ide window setup take care of that?

If you don't want delete-oth= er-windows to delete this window,
then also add:

(set-window-paramete= r (selected-window) 'no-delete-other-windows t)

<= div class=3D"gmail_default" style=3D"font-family:monospace,monospace">Bob
=
--001a113d6c581b95ee055f9ad72e--