unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>,
	Jamie Beardslee <jdb@jamzattack.xyz>
Subject: Re: Scratch buffer on either side of current buffer
Date: Sat, 21 Nov 2020 17:12:58 +0100	[thread overview]
Message-ID: <trinity-d88e787d-b04f-41eb-befb-bb7532108003-1605975178652@3c-app-mailcom-bs01> (raw)
In-Reply-To: <CAP_d_8VNWfm-x1MdPi=U0aqSTX=BmLFYy0BxEyHZyY6CEOA5uw@mail.gmail.com>


> Sent: Saturday, November 21, 2020 at 5:03 PM
> From: "Yuri Khan" <yuri.v.khan@gmail.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: "help-gnu-emacs" <help-gnu-emacs@gnu.org>, "Jamie Beardslee" <jdb@jamzattack.xyz>
> Subject: Re: Scratch buffer on either side of current buffer
>
> On Sat, 21 Nov 2020 at 22:43, Christopher Dimech <dimech@gmx.com> wrote:
> 
> > > > 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.
> > >
> > > You’re sure you want what you asked for, and not something like
> > > (set-window-margins nil 8 8)?
> >
> > That was my hack.  The plan was that the result would be your one
> > liner.  Astonishing!
> 
> My point is that you should ask for the thing you need or want, not
> for the approach that first comes into your head. Inferring the want
> from the ask is not always easy.

You got that right!  Ok, so now I have got the new code below.
How can I set a default for optional WIDTH?

(defun abuffer (&optional width)
   "Accomodates window margins with WIDTH columns.
WIDTH is 5 by default, and can be set using the Universal Prefix
Argument \"C-u N M-x gungadin-buffer\"."
   (interactive)
   (set-window-margins nil width width) )






  reply	other threads:[~2020-11-21 16:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-21  1:41 Scratch buffer on either side of current buffer Christopher Dimech
2020-11-21  5:02 ` Jamie Beardslee
2020-11-21 14:09   ` Christopher Dimech
2020-11-21 14:52     ` Yuri Khan
2020-11-21 15:43       ` Christopher Dimech
2020-11-21 16:03         ` Yuri Khan
2020-11-21 16:12           ` Christopher Dimech [this message]
2020-11-21 16:43             ` Christopher Dimech
2020-11-21 19:50           ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-d88e787d-b04f-41eb-befb-bb7532108003-1605975178652@3c-app-mailcom-bs01 \
    --to=dimech@gmx.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=jdb@jamzattack.xyz \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).