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:43:56 +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="11911"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Jamie Beardslee , Yuri Khan To: Christopher Dimech Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 21 17:46:17 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 1kgW1h-00030I-HP for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 17:46:17 +0100 Original-Received: from localhost ([::1]:58500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgW1g-00085d-BJ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 11:46:16 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgVzY-00084U-Ph for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 11:44:06 -0500 Original-Received: from mout.gmx.net ([212.227.17.20]:44103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgVzT-0004GZ-Gl for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 11:44:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605977036; bh=DZktyk/AaOYcMFSVzvkMB/o9/HKn3JToTzXv0sEI0Dk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Zi3E4Gqh+JG45wze77GuCFmV4Xz7gX7JeX5zL4S54eCcUMeU0xz7twrvdiADJfhVj J+9tANRVkMoarvbXo7onp5DCWH04S5Uwq1X9IJhVnOjZvwi891CBKc//5Ex2V0fxkM kSuANhbP9dWgPHo6Yl1P2vfYFXC/1zDllPCrvz5k= 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:43:56 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:dGyZgeeZteZPMnWe8HSsSmA5HFHfsUGG4h2SLs23Qc+BWwI/9JzmTehNIgWAf4e2gs8Tb EFsyv37C/SX5SWZGIwMw2yqtsdwjjg46wwlLfRXX46lT6LjZnF3P8wj06ffbcxB62XiSJQgwi5+a SlZu2lObYAsu/SIN4iRzri0mqMRdrTmKrmQmWG3frVOQd/+2OK2lTJ8jkklR8DGsNpk+3AXAS/GI Ka15sN0qoOeKPo+5MS1dWICvo9nbjAfrw0oFa9yqI+xm804L+Xo5o6GskCUKYBLvar++cVpbKN5q fY= X-UI-Out-Filterresults: notjunk:1;V03:K0:P8CRCVjr1g0=:1B86sTqwGyfn3pngD3+yXD rTCFMWpkY/rgjH5p6rCPMPlvAtFSMgZWHPczATuitpXhHcOfrdfOgXfPPIJlOm8r66vysKSY7 E2xCdV3tJpjRIR1vXnrEFvFWZu3MMnL+kQsEhg2gpdDeb/jePG7wcbI5hZCM1xRJ+8SPAOE+J aM5GK4lbyukwLndspGTRbb8MdqEVdYuWt/xtPOuykg6rerEKE2XTV6e+iU52skfbmjQxTSYFJ 4WI0HVSPUqozKR66f82FUmUHw/ZefqpKqyACYlf4zcoUscoTRD6nKoaEr4zJWtmv4leh9g0ef 3MzsALnzLaZk01Qyyn1EJ5auGy0ia3ck6LpsL366tvNjOOZb+MBoggOg4xE8poY2GyFg2jg5t tdBm0lxOfTDpeENIB5us/xWm2JMBrczY/+OWA+miWGsN9MbJXsL8IWVtO5r9cnaXMlarNenYo SNnjfG8hU8X0sUWJS1N15T//T9GG5QLvId6Fd4ct6FkGDFanteOowTG+dlkul/quaLxu2z7vH YtRAlfOofROhmUyk/Ht/MLX2kmGECVBty6fhOn25JRoJ4mnHdTxx66aqM0mu1DYrKxGV9u7M9 aiflQpOXV2pz4= Received-SPF: pass client-ip=212.227.17.20; 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:125450 Archived-At: For default I have done it this way (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 abuffer\"=2E" (interactive) (unless width (setq width 3)) ; Defaults width (set-window-margins nil width width) ) > Sent: Saturday, November 21, 2020 at 5:12 PM > From: "Christopher Dimech" > To: "Yuri Khan" > Cc: "help-gnu-emacs" , "Jamie Beardslee" > Subject: Re: Scratch buffer on either side of current buffer > >=20 > > 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 wr= ote: > >=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 st= ay > > > > > in as my working buffer and take the remaining space in the midd= le > > > > > of the screen=2E > > > > > > > > You=E2=80=99re sure you want what you asked for, and not something= like > > > > (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 >=20 > You got that right! Ok, so now I have got the new code below=2E > How can I set a default for optional WIDTH? >=20 > (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) ) >=20 >=20 >=20 >=20 >