all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Rauchenwald <its.sec@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: save buffer contents without moving mark/point?
Date: Mon, 26 Feb 2007 20:53:07 +0100	[thread overview]
Message-ID: <uirdod7bw.fsf@sec.modprobe.de> (raw)
In-Reply-To: OFCAA72B00.B029E654-ON8525728E.0068B30B-8525728E.0069ACE1@us.ibm.com

Thomas L Roche <tlroche@us.ibm.com> writes:

> Apologies if this is a FAQ, but I didn't see it when searching C-h F.
> I'm currently using GNU Emacs 21.2.1 (i686-pc-cygwin, X toolkit) of
> 2004-03-22 on cm-test. (Hmm, I guess I need to upgrade my cygwin.)
>
> I'm looking for a {function, key binding} with semantics like windows
> C-a, i.e. that will select the current contents of the buffer
> (preferably respecting narrowing) and save it to the kill ring without
> killing (like copy-region-as-kill). 
>
> What to use? If possible please reply directly to me as well as to the
> list, and TIA.

I'm not a lisp-wizard, but this should do it:

(defun copy-buffer-to-killring ()
  "Copies the contents of the current buffer to the killring"
  (interactive)
  (copy-region-as-kill (point-min) (point-max)))

-- 
Your teddy bear will eventually reveal itself to be two other people
put together.  Listen to your computer this month.  Today is not a
good time for not answering the phone.  Never think about financial
concerns without thinking first.  You'll never be happy.

  reply	other threads:[~2007-02-26 19:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200702261706.l1QH6WiM031013@e36.co.us.ibm.com>
2007-02-26 19:14 ` save buffer contents without moving mark/point? Thomas L Roche
2007-02-26 19:53   ` Tom Rauchenwald [this message]
     [not found] ` <mailman.130.1172517269.7795.help-gnu-emacs@gnu.org>
2007-02-26 19:43   ` james
2007-02-26 23:41   ` B. T. Raven
2007-02-27  7:02   ` Mathias Dahl

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=uirdod7bw.fsf@sec.modprobe.de \
    --to=its.sec@gmx.net \
    --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.