all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: How to get rid of default lines in the *scratch* buffer
Date: Wed, 10 Dec 2014 08:53:38 -0500	[thread overview]
Message-ID: <jwva92vk3x9.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 4b37884b-d344-4a69-934a-ec1fbc2fdaa2@googlegroups.com

> (switch-to-buffer-other-frame "*scratch*")
> (delete-region (point-min) (point-max))

If you only want to empty the buffer, without any other side effects
(such as displaying the buffer elsewhere):

   (with-current-buffer "*scratch*" (delete-region (point-min) (point-max)))

or just

   (with-current-buffer "*scratch*" (erase-buffer))


-- Stefan






  reply	other threads:[~2014-12-10 13:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-09 16:49 How to get rid of default lines in the *scratch* buffer chickenkinwing
2014-12-09 17:04 ` Marco Wahl
2014-12-09 17:11   ` Rusi
2014-12-10  2:54 ` Robert Thorpe
     [not found] ` <mailman.15713.1418180083.1147.help-gnu-emacs@gnu.org>
2014-12-10  4:08   ` chickenkinwing
2014-12-10 13:53     ` Stefan Monnier [this message]
2014-12-10 10:38 ` Nicolas Richard
     [not found] ` <mailman.15723.1418207966.1147.help-gnu-emacs@gnu.org>
2014-12-11  1:14   ` chickenkinwing

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

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

  git send-email \
    --in-reply-to=jwva92vk3x9.fsf-monnier+gmane.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.