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: Re: Changing Frame Sizes Date: Wed, 9 Dec 2020 00:31:35 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4211"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help Gnu Emacs To: steve-humphreys@gmx.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 09 00:36:05 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 1kmmWa-0000zQ-Mh for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Dec 2020 00:36:04 +0100 Original-Received: from localhost ([::1]:38844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmmWZ-0003at-Hi for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 18:36:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmmSK-0003Yc-Vv for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 18:31:41 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:33365) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmmSH-0007lx-Qw for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 18:31:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607470295; bh=NJtYczOWnzLiXt7GCLJkPzbswPQggxn8qlblAzRMHl8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IqbHrHmiD3ZqXy/Cx0WIvS6+UDpMHSVgG6WcpQy1KCN3e/aqEpFWCcHqE46N3qGTd H5Qo6uIhALEiRdaV5UowOoOCRAU77g6fjb/CgBzokiIame/4PeGGZFfItxSpSGY8jR V7Vp6h0XwK0cijDwfDCsx6uRuvfKsPBJFVn1wCV0= 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-bs11.server.lan [172.19.170.179]) (via HTTP); Wed, 9 Dec 2020 00:31:35 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:gtguXpPatXK5niKH2KhczHf9KQl21jw4Y2cCDwL8g/PYxd7VGFG2zN6JnzumEd76a8q9b SrPCaXnExIJFoHNqxQystt4MAn+XR9Nm6BelbhetYz0jZRjpDLv13S6G/OhgqmDXPJDMkOGalmAu RRjrp+AxD3FOp6SCg+pSIIm0aqjFGBJxZJHbPYd2NjADXD4OPo+WD3F1FS88LadAPU7siqp1DSk9 zBbcka5/dcJnMEY9Fax8vwnPJEvgp1V06ZNpihPloHXd99xr6jf7yLviiXo4Wrlb5JmA4Q/tHOov HE= X-UI-Out-Filterresults: notjunk:1;V03:K0:9i/lJNVf910=:n73lOsyZjGkhncxx0Y+w96 PvxFthihN2Ph1FNeHZxm3nrwBEV9etatL/J+BeDrSahpjVvMO8vkCNtWgYsiD3rMky876mJYp 8671ukdMkbsyKScuJr55Ze3WaDz48QS2hli7fj5GK/wbdCHtVnAy/HPTtATb/kMY5wV66xRV7 oRF7XY3/WDn6dU6kX2tDcIimZQyjbnWh2G6q0/YlmdTJEdvPFH2iuow5iMUKyUpm0RHhJlCvf 8Q0LTu4goPOTtWOpj3ikwSPW9h+1q8laB1tMnG+9kYkbY6QLTg8T9te+zZmWMKkUnh1Sr0Lf+ 55qfpqo7+vexdfMyv15VbitW/gvulN5vwDpfvjrD7srRcNgDVCsJZcg29NnMGa3APTRxDQv0b J0BRWzTBRzaeJ37zE26fnyNwCDpDqfWZs6bp3DdF2Gg3cN9JlCAFOl+glT/SYGCXDk8Wn64AI lLPyF09j9Wh6ZLZfC8/8zssW5lMtaY3HufBC0b7rPJLubD+4Cn6c68kej4ovusZmvwtzalYfS lxjeUC06bSCV4ORsxu87Wok8AItftIwIdTcj+fT6WsPlrXZvTKCq11Z3eu0pCgMrQkQt/SAfo 4nks7Vvxt/M+A= Received-SPF: pass client-ip=212.227.15.19; 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:126184 Archived-At: I would like the margins to be applied to all windows rather that the current one. (set-window-margins nil width width) > Sent: Wednesday, December 09, 2020 at 12:08 AM > From: steve-humphreys@gmx.com > To: steve-humphreys@gmx.com > Cc: "Help Gnu Emacs" > Subject: Re: Changing Frame Sizes > > > What is the difference between set-frame-parameter and set-frame-size? > > > > > Sent: Tuesday, December 08, 2020 at 5:18 PM > > From: steve-humphreys@gmx.com > > To: "Help Gnu Emacs" > > Subject: Changing Frame Sizes > > > > Have the following code to change the frame size. It works fairly wel= l > > when using numbers. But have got into problems when trying to use 'ful= lwidth, > > 'fullheight, 'fullboth. > > > > Another problem that I am encountering is this. When there exist mult= iple 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)) )) > > > > > > > > > >