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 15:09:11 +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="1741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Jamie Beardslee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 21 15:12:00 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 1kgTcM-0000M5-07 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 15:11:58 +0100 Original-Received: from localhost ([::1]:43368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kgTcK-00063r-R4 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 21 Nov 2020 09:11:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgTZk-00062o-Sb for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 09:09:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:60659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kgTZi-00078p-Ga for help-gnu-emacs@gnu.org; Sat, 21 Nov 2020 09:09:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1605967751; bh=VKl71m/ljDL7jLiFVIEnFayeVKyf42k94G32KBDOLEE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=AI7/gXRyLLEA+BbQrGTA516BiSwmu0PU80hFBaUS08248Oq4MEMFdKtWMV1P2jpHU PkscEtzDCJhBNnAYTDkUeoOkfGk/TuStqt8Pfa2mjIRZVkM03dtvdZXuf31S4SP4d3 9IS/z0QH14yXKUeZaCBvsM1WKsVOSdfQ8jWjaABw= 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 15:09:11 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <87a6vbz4i3.fsf@jamzattack.xyz> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:Aa5E8tIgeOJ7+ERkwLIapzJV1puFXWibkA+eu1e/QpOmUpO440TPuWDjlWoKhg3NLEtbG 2fR+9+x5BmAQ5lvReyWofbNX/w35yR3jNojj/rnqrducqxrumo35pVobDRddRIM3ugkY8IGUctBW VLxyRJ9URbP0bpeFA4cWKBxFuYVsn3lh6QSlwVmcEP6fIkkJrdldX84oSGmTzbwcu9vhIVtOifNC c8Q5F9nmF1Q2lQHBthD+fypmbKz3KhtRJWyYPQ+dFcoH48MxCWhhQ/PE8trR1drvP+yMp8RlUFY6 p8= X-UI-Out-Filterresults: notjunk:1;V03:K0:FFLUI5WnKWI=:afAqeCZubqKod3l7jMRIFH n+69p7qMNFrXrQL19k479W7nkz4AevKqUqpjjYrSeppF/ijXNsGR7uqxVKJFUF8NR+GOROuzB MzoNAyPUt7cbNoHlTmhNaXdWUh/24MkGIESoyA1PGuKZoq/UZr1IeDPQ5/TjbHknxxLvTdFuu UZQ3t/QQqEPMYCeG1Gzkcpk1B4fWhGOzwkP/V7aTs6avd3k8Q/jLjFQgMUBmVC+aduvCMsygi cTdNh+yNKqGwwFtmrvZD/qs3MaXoiNCPoR6gvJFf0CsCD/KDpfukA5POroUCg+S7RKfjbT+1z 0sXAFyI9rVYxdoRHIiEDuBXnGurE0JoEag7rkzTgwfxBdv6ahWlDs2uQBUGCda+ghBhbD8NMG DoWm1CubfFoO3wNChI1/kFixr7Q+21cQd2NKNTH/cYIvUVGkD0mFUd3fy3X6ZA60Cu79PHoni gGPWW5fk3hQ98DzaQliNP2j959MQGXEVx212gpsnMNPzD519HhvyVnem4ksuPvFl/9qEW6tYs TkQMBLKN2p1GC0jI2ovmfTvUeuCo2Vwk243w6/SXCcia7qm4MqFHyWkeHmvXV0xJXS/84REt2 2hMMspNSSEL80= Received-SPF: pass client-ip=212.227.17.22; 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:125441 Archived-At: Have modified it like below, but is not weird enough yet. I would like only to set the size of the two scratch buffers to be small by default (e.ge size 8), and my working buffer to stay in as my working buffer and take the remaining space in the middle of the screen. (defun gungadin-buffer (&optional width) (interactive (list (when current-prefix-arg (prefix-numeric-value current-prefix-arg))) ) (let ((buffer (current-buffer)) ;; ----- body of let ----- (scratch (get-buffer-create "*scratch*")) (width (or width 8))) (delete-other-windows) (with-selected-window (split-window nil (- width) 'left) (switch-to-buffer scratch)) (with-selected-window (split-window nil width 'right) (switch-to-buffer scratch)) )) > Sent: Saturday, November 21, 2020 at 6:02 AM > From: "Jamie Beardslee" > To: help-gnu-emacs@gnu.org > Subject: Re: Scratch buffer on either side of current buffer > > Christopher Dimech writes: > > > I want to have a window-buffer (containing *scratch*) on each side of > > my current buffer. > > Here, try this: > > (defun weird-window-configuration-please (&optional width) > "Split the frame into three windows. > The current buffer is placed in the middle, and the \"*scratch\" > buffer is placed on either side, with WIDTH columns. WIDTH is 80 > by default, and can be specified by a prefix argument (C-u)." > (interactive (list (when current-prefix-arg > (prefix-numeric-value current-prefix-arg)))) > (let ((buffer (current-buffer)) > (scratch (get-buffer-create "*scratch*")) > (width (or width 80))) > (delete-other-windows) > (with-selected-window (split-window nil (- width) 'left) > (switch-to-buffer scratch)) > (with-selected-window (split-window nil width 'right) > (switch-to-buffer scratch)))) > > -- > Jamie > > >