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:08:16 +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="31549"; 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:24:03 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 1kmmKw-00087h-O5 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 09 Dec 2020 00:24:02 +0100 Original-Received: from localhost ([::1]:49480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmmKv-0004Eo-H7 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 08 Dec 2020 18:24:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmm5l-0003be-EA for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 18:08:21 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:60007) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmm5j-00086m-8m for help-gnu-emacs@gnu.org; Tue, 08 Dec 2020 18:08:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607468896; bh=m3EZNpEz+x6vArokvmCgAzxask9UTmR8nlmX2rpQuDo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=UNl9HmexB16IVvdmPw9gbY2PyJGsv7F/Z+jyDYhfrJcmtJJP/h/B77IDcuaVX5JUA qgfNevPaxMG5nMQsrZE/lP/S+Q51jYI5WlsMFkWlN4SjDOn3q4WQp3Hez6x/6j+MYL pF77YqXX1LrxxMhjsrFasNxe6Crn+JMcCndvbHXo= 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:08:16 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:NnT+KBGNp8EdTANOj62KjTO7mVV39M4mbUF7ftpos9czwHalswvmSV71FsnMq2Meqo6by D0cGWVvMASE8h00WR4cYJDwKTgGZoE2e6LdZ2+QGmvbgG/10EbKuoTDe8Nzby2Z3dGqyrNaOr1Uj BPmjHmQ7NS8S6h0OtChmY/IasSd6LEw/mu9Dtwcx/f4XIfYFXapyql12MHM+3Cd3RO7BB/LZBgQp 3XcnUfuxeRNscqh4r2Ab2E03ac3ddGV4FPlaIFignnEtzhWLTvWuwMdHp7G7i94jokmEZcnPS9h5 2Q= X-UI-Out-Filterresults: notjunk:1;V03:K0:Y1YXduCLdIU=:cdnj2x5cQXJ03f3hCMvmFL M+BF48edhySb3o2fZ9PuoOX8ru/ED4AWavPwZO7EK5rEM9g1R1/Ox6bHhuuoCCTTh71I9aiDa f+gFms/QNtprEDC5STaS7AoQnvwO1yPLzHtQ3+GqM+eIoEtpcxsGh8vUtRYSroeGCg0XmXvpr Jb8hkdnTsX6EyktEu6eWbpQqjB++LMQc5L4G8KP18rCgKHBQUaWmo0Z+Ivf4skR41CvFO2fNy MEkAyXeIBZMgZiUDLSFzDm1ICwNYvv45PK/E+nBRuCYcLaqewx5f0Ld1/we51xK6oDfSg8GoH a209hrihnjuzLVXRHytJ1iGr8529tDQF0/4fOJ5RcdgTv1cueb0vmt83AOhdOk8hSM6QX5JHu XNVkSZoWP7DVDU11UrzBORojgWg9G458Esle9Obwml4gymeS5lJUDW23ct+f4bgceS6uv6zwp GHp7YKRInfsGBqjtpzzCzA9bhF/Xtr3fzXByK0Eo8veefMgKdCpLYOxlfarrKmn924rTDIV4x aSRVeaQfhSj7I7uzTpFgzLYTeP4sZKhLm3OvuArdr3B/IiBKtI5BBviAywGyK2WGALftDW5Dq MPRs1+e/UV2h8= Received-SPF: pass client-ip=212.227.15.18; 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:126183 Archived-At: 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 well > when using numbers. But have got into problems when trying to use 'fullw= idth, > 'fullheight, 'fullboth. > > Another problem that I am encountering is this. When there exist multip= le 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 pu= t-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)) )) > > > >