In this excerpt from
Answercast #100 I look at how the clipboard works to store information in,
and between, programs for copying and pasting.
Become a Patron of Ask Leo! and go ad-free!
Lots of things on the clipboard
Ok, that’s actually a fairly easy one – and I understand that it takes a lot
of people by surprise.
It all relates to “copy/paste” or “cut/copy/paste.”
Cut and paste
Let’s use cut and paste for example. Say you’re in a text editor, you’re
editing some email; or you’re in Word, you’re editing a document; you select
some text and you press Control-X to cut the text. In other
words remove the text from wherever it is.
You then go somewhere else and you type Control-V to paste
in the text. In other words, whatever you had just cut and removed in one
place, gets pasted or placed in the place you’re currently at.
Well, in the interim that information had to be stored somewhere. And where
it is stored is a place called the “clipboard.”
Clipboard stores information
- When you “cut” you are actually deleting something and placing it in this
- When you “copy,” you are copying from wherever it is and placing the copy in
- Then when you “paste,” the definition of paste says “take whatever is in the
clipboard and put it here”.
That’s how we allow different programs to copy and paste to other programs.
For example, you can copy something out of Word and maybe paste it into an
email that you are composing. That happens through the clipboard.
The clipboard is the central repository for this information. And in fact,
if you take a look at the icons in the various programs, you’ll see that at
least one or two of them look very much like a little tiny clipboard. That’s
Now, the warning you are getting about having a “large amount of information
in the clipboard”.
For example, let’s go back to Word for a minute. The clipboard gets managed
in a couple of different ways. So far what I’ve described is that information
is actually placed in the clipboard. So if you copy a couple of words
out of one place, those couple of words are placed in the clipboard.
Some programs don’t do that. What they do instead is they place in the
clipboard, a reference to what has been copied.
So for example, in Word, if you say select an entire document (that’s the
Control-A keystroke, by the way) and then you type
Control-C to copy that entire document to the clipboard, Word
doesn’t actually do that. What it does is it places in the clipboard a special
identifier that says, “Hey, I’ve got this big old piece of text and it’s
available to anybody who wants it from the clipboard; you’ll just need to ask
me for it in order to get it.”
So the information, such as the entire document, isn’t actually placed in
the clipboard – but a reference to it is. That reference is only good as long
as Word is running.
In other words, since Word said, “Ask me for this if you need it,” well if
Word goes away, it’s not around to be asked. So if you were to actually exit
Word after having made such a large copy of something, then Word needs to say,
“Hey, you know what? I put a lot of stuff on the clipboard; it’s going to go
away if I close; what do you want me to do? Do you want me to keep running? Do
you want me to actually put a copy of the document on the clipboard? I can do
that? Or do you just want me to empty the clipboard and exit?”
Those are the kinds of options that you get. It all has to do with the way
that the clipboard works.
Copying large amounts of information to the clipboard
Normally, and in my experience anyway with the way I happen to use Word, it
is almost always with Word that I run into this situation.
What happens is I’ve got a document and that document may have some pictures
in it. That immediately makes it a very large thing with respect to the
clipboard. If you copy a few pages and those pages have pictures in them – all
of a sudden you’re putting a bunch of text, a bunch of pictures, a bunch of
other things on this thing we call the clipboard.
It’s available for another application or maybe even another instance of
Word. You could be paste it into a new place in your document or into a new
document – but the fact is it’s still all running through the clipboard.
So, in my case, I’m usually done with it by the time Word asks me – and I
just say, “Go ahead and erase the clipboard; that will be fine.”
But it’s really up to you and what you’re doing. If you’re done, it’s fine
to go ahead and let Word close down and erase the clipboard (or whatever
program it is that’s asking you.) But that’s all it really is.
The clipboard is the link between cut and paste; it’s the link between copy
and paste. It’s this repository in the middle that holds what it is you are
copy/pasting or cut and pasting while the operation is in progress.
(Transcript lightly edited for readability.)
End of Answercast 100 Back to –