emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to prevent window splits for a window or a major-mode


From: Robert Weiner
Subject: Re: Any way to prevent window splits for a window or a major-mode
Date: Tue, 5 Dec 2017 12:04:51 -0500

On Tue, Dec 5, 2017 at 3:53 AM, martin rudalics <address@hidden> wrote:
> ​The 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.
​​

​It 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]