I'm interested in learning how the term "yank" got its name. I'm also interested in why Emacs "yank" differs from vi/vim "yank".
See also: dual question about Vi, also on Unix & Linux;
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityI'm interested in learning how the term "yank" got its name. I'm also interested in why Emacs "yank" differs from vi/vim "yank".
See also: dual question about Vi, also on Unix & Linux;
"Yank" is just English. You are "pulling" some text into the current buffer at point.
Note that the more common term "paste" (no, it is not quite the same thing) is no clearer in this regard. There is no glue involved.
Note too that the verb "copy" has two meanings that can confuse its use. One of them means to make an invisible copy, which can later be used to make a visible copy. The other means to duplicate. When you "copy" text but you do not paste it you do the first of these. When you "copy" a file you do the second.
Yank's meaning comes from English language's action verbs similar to jerk, pull, draw, force, etc. It is a more active verb than copy, paste, and other modern synonyms GUIs use. Please refer to other other responses to this question for its semantic history.
There is one important functional history of yank that many modern uses of copy-and-paste ignore or oblivious to. It is the selective integration with the operating system's clipboard.
Ctrl-y is the default yank command that normally retrieves the most recent entry from the *kill** ring. However on GUIs, emacs yanks from the system clipboard if there happens to be a more recent entry than on the application kill ring. Yank also plays nice with primary and secondary selections in GUIs like X-Windows.
It is this level of selective integration that sets yank in emacs apart from other cut-copy-paste operations in other apps.
Based on the comment given earlier:
Emacs
version 1 already used kill/yank, which it inherited from TECO
.
TECO
dates back to 1962 but it's unclear if the first version already had these commands.
Some PDP-8
manuals mentioned the yank command, but they may not be the original PDP-8
. Nonetheless, it seems that the word paste, which became the standard when ordinary people got GUI
s, was chosen at Xerox
in the mid-1970s.