From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: steve-humphreys@gmx.com Newsgroups: gmane.emacs.help Subject: Changing Frame Sizes Date: Tue, 8 Dec 2020 17:18:27 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25803"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 08 17:24:33 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kmfmy-0006bN-Ki for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 17:24:32 +0100 Original-Received: from localhost ([::1]:52462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmfmx-0008Iu-EH for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 11:24:31 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmfhC-0008IB-Kc for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 11:18:34 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:59215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmfh8-0006K8-QJ for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 11:18:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607444308; bh=64IzhHtj0RTt6OpqEn9LwlhZtmQ3ZIlOcII87U04g7c=; h=X-UI-Sender-Class:From:To:Subject:Date; b=PDILlgWY+M2C77nKhqdVT8EYwTHFXR5gb8Ryi0HgLItupxXp789gKgTwVrpCx7LQk g6GTRS01I8r+SpCDp5hrrI8aGRLq4jurpPLKWpMo5Jo2patpOcdLSTjXiZ26MPhxzi qQoMAZO0AoH3uEjRc2xHAH8llvAHCdiqhKaOpbJw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [213.165.168.94] ([213.165.168.94]) by web-mail.gmx.net (3c-app-mailcom-bs08.server.lan [172.19.170.176]) (via HTTP); Tue, 8 Dec 2020 17:18:27 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:1rqVxngtV0SrLehKNE1mqpTHlDJJKKGdpExpdmEyCh9NRGUUWOBBWD9RDoKOgKBdhIuWX mGVl2JQx3oYOtQj1onfqad0Wn3d4yeO9TFhdJcKbW+vA99bhUM9NiKJyExvvzARzrQzijGsBjKfs ROUOXNJ+k0iZ58Dd4Q6N4YpPCQ2ZvB938ICOolzDgeQ5GnYqtCDmCWuzq8mWxLiNb9mWi/nT33Kt q5YgYLiHLMhziYlIVptRqj5UFKitBMtE99juwJjCh9giBLq4JtipT8wXrwiwTLtka4CS40XH0Lq+ 6M= X-UI-Out-Filterresults: notjunk:1;V03:K0:ZIbFnWmRPI4=:kCwIe7kIS+u7Hf6mTOPWFi R6nmKzYx2Ax1XJg4B9Tnq87VGKmQIruCyTulypumo6sUoXvhcH00dRXmAOzxwm06YDCuciFy6 HiktBcVeSkFZ+oW5hiBwdtQfn9LwyKircdVJ7KOtEpWCjKrqzJhnKc7peTnGUXR9z+MxAEu8y 7xbMklPi/dnYcLjHV1cW6rovAIP4A7gcC0DvYKa1li4EtKqY73mqnlbR8MnLT40bK2vr1f54b qE3t70K+QJnuVSf4wyPay7wIvZp7QiSZc0F37vYiR18UhSJ0MPLRwPgfFsJNqpqq6g+lPhbco JDFf00yXWH82PQWxuyJ0dz06e6H1Yho+7jtgxBNpiZ9EjOHxxJAUyrqBgeh61EIZtnto1r4vU AfQRS6q7bO0svuby8UsupglmeBE3mVDHU5BaXl2KKwd013qn6eP/dSZyC/91IgK4LQq3xSdwB p6LicNr5L18rYdrqLg6vaR0Vs/Trp93Vj0YnfoSLOmrAvKToHYqVL4/R9NbiHVAxJDxQODwol 0/1lZ9xMat2SAeqAlv/iwoXweu8Hh+OQ0afl6DEClGj7ZCmV6rDRPkAZH3cvNB5/AtF38bfTV a8zDVA68JftEA= Received-SPF: pass client-ip=212.227.17.20; envelope-from=steve-humphreys@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:126182 Archived-At: Have the following code to change the frame size. It works fairly well when using numbers. But have got into problems when trying to use 'fullwidth, 'fullheight, 'fullboth. Another problem that I am encountering is this. When there exist multiple buffers in the frame, the window margins are only made on the current buffer. I would like that the margins are applied to all windows in the frame when calling put-margins. (defun put-margins (&optional width) (interactive) (unless width (setq width 3)) (set-window-margins nil width width) ) (defun fullframe-enable () (interactive) (set-frame-parameter nil 'fullscreen 'fullboth) (tool-bar-mode -1) (menu-bar-mode -1)) (defun fullframe-disable () (interactive) (set-frame-parameter nil 'fullscreen 'fullheight) (tool-bar-mode t) (menu-bar-mode t)) (defvar frame-size-state 1) (defun frame-size-cycle () (interactive) (pcase frame-size-state (1 (message "Full Frame") (if (one-window-p) (put-margins) ; single window (put-margins 2)) ; multiple windows (fullframe-enable) (setq frame-size-state 2)) (2 (message "Frame: Size 90x34") (put-margins 0) (fullframe-disable) (set-frame-size (selected-frame) 'fullboth) (setq frame-size-state 3)) (3 (message "Frame: Size 75x34") (set-frame-size (selected-frame) 75 'fullheight) (setq frame-size-state 4)) (4 (message "Frame: Size 58x21") (set-frame-size (selected-frame) 58 'fullheight) (setq frame-size-state 1)) ))