From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Any way to prevent window splits for a window or a major-mode Date: Sat, 02 Dec 2017 11:17:05 +0100 Message-ID: <5A227DA1.9060200@gmx.at> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1512209846 31523 195.159.176.226 (2 Dec 2017 10:17:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Dec 2017 10:17:26 +0000 (UTC) To: rswgnu@gmail.com, emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 02 11:17:20 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 1eL4rE-0007Zw-L2 for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 11:17:16 +0100 Original-Received: from localhost ([::1]:35045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL4rK-0005O7-7l for ged-emacs-devel@m.gmane.org; Sat, 02 Dec 2017 05:17:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eL4rD-0005Jc-VM for emacs-devel@gnu.org; Sat, 02 Dec 2017 05:17:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eL4rA-0005jt-Jn for emacs-devel@gnu.org; Sat, 02 Dec 2017 05:17:15 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:53846) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eL4rA-0005jK-9v for emacs-devel@gnu.org; Sat, 02 Dec 2017 05:17:12 -0500 Original-Received: from [192.168.1.100] ([46.125.250.88]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LcBPV-1emwoS1AQv-00jcO0; Sat, 02 Dec 2017 11:17:09 +0100 In-Reply-To: X-Provags-ID: V03:K0:KCOOZ//KlFaG9/rjNyJ4s0NuV33JpoH18I72tvtADSg5/geW3dv 5NkU/kjOR10P5VfBr6zDOLmgsBVLisaV5EE4r5HdsA9Zr9ytadw2/t+dXXISErObTcljtPk RYgZ2sREP9GPJWO7rxVIeXlpEkmRY9nGM2LjhdGSGRfP6SRGdngknqc83znu8ykOHyCkjgf 1wBWGhgWqkpLrfLZfM+AA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ob6DudpAs1A=:8sA6SY8yiRRN6ZZU10L3En Tcm61YKE4r2e75cQhjiJyeZ8UoVcS3oLXjCeue6/q7eCWHhmBR1cugUaUgvgrdZe/+81+yVmO 5ebaJmNLPMd5V+otNB9w6CxchWr8Rgz9/8Phde5WcRSscGt6JCpTM1ukdu1JyrZKJMK43TYSM KhPlwDOjMnWysD2zozvUEPQa7n+/6znqI3MXCwGKCrRgHbnVdNTYQus9o9OnZX7cbZvh5Eect 2Qdb4yGgTODOjccagkn3QB4JcZTAbkG36Tyz7+PQSpxojlsqqOoOlZJe0fPPjrngmSG+zC21k K/tVEgf+NN8ZzSq7uO5fmFYpdKi4WWdDbxaO7klS6UynxKttr3o1+4cQLrBT4KfgD5UA1UgQt kJTkgQDQNs7/YDIMBxmLcLpS3pO6Nb+AklvuL+jUbwxN9MJHNBpBP8zdmVGs27W2MVc7pJ2gE 9U2EP1wsJ8R4jA/Ylbht/NUcwpu2vGVndI4SDysaixN2/TN4vKiUB1xb+73Ul3vp8u3NeeRKs OT6YaTRrsrPoZaw4rO92y/0VNW3yEgLO16oOc0XgCcn/c7XBbs7RkRSPgq84yTuxANPM8g0zx 34SZAXKT/+idJHIKEWvtZyyrEjk8xv0vjR7hUQJ3KuZUWfRftRlKdklUgYaQ4gWOydRFDG2sc XERwki9ip95HPNaQ/cpIVGlc/LMoE7hDfXP4qAyaeYXOEQIGxa65z8NelBvCvwnW712pgmklj apLD5GZ9Rq5VukoFBqc3hP0C+OElYgAKoU60rlKkV0BKl/8jsi6xZK30VgAVoNs/qB8pSX+x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.20 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:220611 Archived-At: > For a window, I would like to be able to mark it so it is never split. The most simple approach is the one Drew mentioned, something like (set-window-parameter nil 'split-window #'ignore) for the selected window. But this might be too strong with functions (like `display-buffer') that expect a window to be splittable if it's just large enough. So fixing the window size by setting its buffer's `window-size-fixed' variable or the window's 'window-preserved-size' parameter as Eric suggested could be more appropriate. But maybe you should tell us more about the case where you need such a property - `split-window' is just the Emacs paradigm for creating a new window adjacent to an existing one. > For a major mode, I would like to say for any windows displaying buffers in > this major mode, don't split them. > > Is there a simple way to program that? You will have to put a function on `window-configuration-change-hook' which runs through every window and, if it displays a buffer in that major mode, sets the 'split-window' parameter of that window to 'ignore' or preserves that window's size. And obviously the major mode hook would have to add/remove that parameter for every window showing a buffer where that mode is turned on/off. martin