12

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;

  • 2
    There's some interesting discussion in this question: unix.stackexchange.com/questions/209660/…, particularly the parts about TECO, that's the best I could find. Probably at some point in TECO's transition to EMACS, the term "yank" was changed. You may have to ask RMS, and if he doesn't know, then it may be lost to history. – nanny Oct 1 '15 at 15:18
7

"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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.