[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compleet buffer to clipboard
From: |
Alan Mackenzie |
Subject: |
Re: Compleet buffer to clipboard |
Date: |
Tue, 21 Apr 2009 06:55:26 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Decebal,
On Sat, Apr 18, 2009 at 05:27:38AM -0700, Decebal wrote:
> A lot of times I want to copy the complete buffer to the clipboard.
> This is possible with:
> C-x h
> M-w
> But one of the complications is that you lose your cursor position.
> When you put in yor .emacs:
> (defun buffer-yank()
> (interactive)
> (kill-new (buffer-substring (point-min) (point-max))))
> (global-set-key (kbd "C-c C-a") 'buffer-yank)
> Then you can use:
> C-c C-a
> to copy the complete buffer to the clipboard.
Sort of, some of the time. C-c C-a is a binding reserved for major modes
(see page "Key Binding Conventions" in the elisp manual). If you're in a
major mode which actually uses this binding (e.g. C Mode, Diff Mode), it
will take precedence over your `buffer-yank'.
You might be better using a binding reserved for users, say C-c a.
--
Alan Mackenzie (Nuremberg, Germany).
Re: Compleet buffer to clipboard, Xah Lee, 2009/04/20
Re: Compleet buffer to clipboard,
Alan Mackenzie <=
Message not available