From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Scratch buffer on either side of current buffer Date: Sat, 21 Nov 2020 17:12:58 +0100 Message-ID: References: <87a6vbz4i3.fsf@jamzattack.xyz> 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="38929"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Jamie Beardslee To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 21 17:14:50 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 1kgVXF-000A0J-Qm for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 17:14:49 +0100 Original-Received: from localhost ([::1]:46166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgVXE-00010I-FF for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 11:14:48 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgVVY-000108-1t for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 11:13:04 -0500 Original-Received: from mout.gmx.net ([212.227.15.15]:43579) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgVVV-00087p-RD for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 11:13:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605975178; bh=uWGm+H1p1hNtjTwp4MVKz7mCn5/S8F6OKwjZyeXNE1I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=g69G+Jl/rAk8u2Jwwtprpg/6fDUDbLXFchaJK25jUFmW2QzYCeHFm7orINfHWsAR6 feqOhoMWAoTa9UiW6pYi1ADz+steiPcYul0GkIVJ5escwiRgxvm0QATghZog2XCcOo GcAoFbC5M7DQxGlE+LU1t5jdxHi+V5Qm6IElrfro= 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-bs01.server.lan [172.19.170.58]) (via HTTP); Sat, 21 Nov 2020 17:12:58 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:r6HNTmq2vyL/kc6y2+ZHDF7cmT9tQQLShRQdIw/Ix3aZwdtCQ92nOfUMFXu+bjYpYts1g DC7sPrlsRPVVftjYgrq6fbuj8/OPKQ5lFv8qgUgYhFGHjMHrTIKsGWaVwSFcFDiQR/D/UmbtZOZP JWgCZ+40ZEiYt7EQou/oExytz/kTF2251Td0B1GioXOqRs3wgspUYTs0JiM0UVd0v24YzqaYL6qV nmKXYy0RSu2V4TdJuneZhnevpd53dMCdm2AqbRDpj6Uco/q+hcQ55oSwDZKHyPPWP/pu5Ekcx+5t Xw= X-UI-Out-Filterresults: notjunk:1;V03:K0:qUhvIBGPZzc=:6u6DhEvX/X4h0cVr0+J7By mIV5RmF8ITiAzIJ42nTgjgWCjle8pTbzHRrJDm65dztWpSIN+TTHW+Wg8/E31Bvwqp0quELng 5jyapKr95hW4SpZMB+0MdE5Sgu6wQWPB1NvxvOk9112W1Uz46FjciL7pL05pIS0/TLU7KMBFf BMiU6SWsMqBJGau8rrQmayA2kVFaSGA7p+neE8zFPSZUHVqye6Da1MaR7o7KlLcukCRuXexE9 0Uy30gJrB0hM9uHeQh3t9sUI2B2WGWnAxd9CJSKYapKIQJ5cdf+2UMCuzrVuchXg2Is1sKCAe vMM8vgStgJVExfoGWrr94zXlcIjbOGYiYOmQKN8LReBg6kj+DhMDkYLs+3zcNU6pP3atKsLyU 7mJk2635xDsA4lMMAZZz24QJ5NbiR9opcvTkcmQzNoKEq8PNVPJ2TEbEYVscnPdy8bZitxVCG uUpGT6sS1GXa0A6u2uZEZvXr15al+Ywk/WO3n0jFj34lGZlswUSBKavZUI8Vfz2YzugDW1Ng+ DlnGI0obL0ILqH04hHlDROlQlWcDBH26BWHBOehZodEcGW5dMcOcOE1RNYN3VGWiI1d8P685H E94qGCjZuOBCQ= Received-SPF: pass client-ip=212.227.15.15; envelope-from=dimech@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:125448 Archived-At: > Sent: Saturday, November 21, 2020 at 5:03 PM > From: "Yuri Khan" > To: "Christopher Dimech" > Cc: "help-gnu-emacs" , "Jamie Beardslee" > Subject: Re: Scratch buffer on either side of current buffer > > On Sat, 21 Nov 2020 at 22:43, Christopher Dimech wrot= e: >=20 > > > > I would like only to set the size of the two scratch buffers to > > > > be small by default (e=2Ege size 8), and my working buffer to stay > > > > in as my working buffer and take the remaining space in the middle > > > > of the screen=2E > > > > > > You=E2=80=99re sure you want what you asked for, and not something l= ike > > > (set-window-margins nil 8 8)? > > > > That was my hack=2E The plan was that the result would be your one > > liner=2E Astonishing! >=20 > My point is that you should ask for the thing you need or want, not > for the approach that first comes into your head=2E Inferring the want > from the ask is not always easy=2E You got that right! Ok, so now I have got the new code below=2E How can I set a default for optional WIDTH? (defun abuffer (&optional width) "Accomodates window margins with WIDTH columns=2E WIDTH is 5 by default, and can be set using the Universal Prefix Argument \"C-u N M-x gungadin-buffer\"=2E" (interactive) (set-window-margins nil width width) )