Hacker News new | ask | show | jobs
by Vexs 3629 days ago
Wow, it kind of sounds insane that we don't have multiple-copy paste by default now. Come to think, I can think of a bunch of times where I open up notepad to store a copy-paste.
4 comments

Emacs kill ring?

https://www.gnu.org/software/emacs/manual/html_node/emacs/Ki...

It takes a while to get used to it, but once you understand it / use it in anger, it becomes tough to live without.

Only in unix-world would it be considered wise to call the place where you put blocks of text for later use the "kill ring."
Nothing to do with Unix, it's an Emacs thing.

In Emacs, what you nowadays call "cutting and pasting" is instead called "killing and yanking". It was called that way even before "cut" and "paste" got popularized, I think.

And the "Kill Ring" name makes sense, as it a) contains snippets of text you killed and b) when yanking (pasting) lets you cycle through all the killed snippets. You can view your kill ring in its entirety via a menu or with a plugin (kill-ring-browser or similar, I forget).

Emacs is old and brittle, but its basic editing model is very good. It does lack (without plugins) some features I learned in Vim (the most irritating thing at the beginning was a lack of "textobjects"; I still occasionally miss them, despite expand-region and other plugins), but is basically the only editor that I feel is worth learning.

>>In Emacs, what you nowadays call "cutting and pasting" is instead called "killing and yanking". It was called that way even before "cut" and "paste" got popularized, I think

Cut and paste refer to literal scissors/knives and glue/paste it predates the Gutenberg press.

Emacs is based on arcane incantations and Elder horrors. It predates creation and sanity. :p
Ok, I stand corrected. And it seems rather logical, too.

So where do "kill" and "yank" names come from?

> So where do "kill" and "yank" names come from?

This is discussed a bit on ESE, though the explanation seems vi-centric: http://english.stackexchange.com/questions/40657/how-yank-ca... .

> Nothing to do with Unix, it's an Emacs thing.

Yes, I know that. It was a joke that used the specific example of Emacs to illustrate a point about how tone-deaf Unix developers can be about UI issues.

> In Emacs, what you nowadays call "cutting and pasting" is instead called "killing and yanking". It was called that way even before "cut" and "paste" got popularized, I think.

Sure, but it's been pretty much universally referred to as "cutting and pasting" everywhere for what, two decades now? The Emacs terminology is a wart, a relic of a bygone age. There's no reason to continue using it, except inertia.

> And the "Kill Ring" name makes sense, as it a) contains snippets of text you killed

This only makes sense if you accept that there is a reason to continue referring to that interaction as "killing" rather than "cutting", which (as is probably clear from the above) I do not. The world has settled on a set of terms to describe these interactions, persisting in using ancient ones just because they're what have always been used just makes Emacs harder to learn that it should be.

(Which may of course be the whole point; surrounding common interactions with unusual terminology is a good way for people who already know Emacs to state to outsiders that they are keepers of arcane knowledge beyond the common ken of man. But social signaling is a shabby motivation for user interface decisions.)

Inertia has a way of preserving value in a way that's easily overlooked. Consider the "save" icon - still commonly represented as a floppy disk even though there's an entire generation in the workforce that grew up without ever touching one.

It would almost cost more to change it (just in lost productivity) to be "correct" than it would be to just keep the association. I think the same is true for the editors.. changing the terminology would also mean changing a lot of mnemonics. Vim uses D and Y for kill (delete) and yank. C is already bound to another function, and there's an ambiguity there between "C"ut and "C"opy. (P is "P"aste, as you'd expect)

Just because you're unaware of the reasons for the design is not good enough reason to dismiss the UI design as "social signaling" and tar the whole of the userbase with that kind of accusation. It seems you have an axe to grind against those SmugEmacs(Lisp)Weenies[1] :)

[1]: http://c2.com/cgi/wiki?SmugLispWeenie

> changing the terminology would also mean changing a lot of mnemonics. Vim uses D and Y for kill (delete) and yank. C is already bound to another function, and there's an ambiguity there between "C"ut and "C"opy. (P is "P"aste, as you'd expect)

You corrected the Vim key (D instead of K), but now it doesn’t support the conclusion. Cut, copy, and paste are already typically bound to Ctrl+X, Ctrl+C, and Ctrl+V, which people seem to use fine without mnemonics. Does anyone actually think “hmm, which key is it to yank text in Vim? Ah, right, y for yank”? (Well, probably, but I imagine they’re the minority.)

Vim uses y and p to yank (cut) and put (paste), not K and Y. Of course, there are other ways to yank (Y, d, D, …). Ultimately, at least the y goes pack to the ex command y.
"Cut Ring" just doesn't have as nice of a ring to it as "Kill Ring".
Modern emacs isn't old or brittle anymore. Heck, we even have text antialiasing now for users with graphical displays! :-)
You have to admit that it's an apt name for something George R.R. Martin could use, though.
I seem to remember that Windows had at one point something called "clipbook". I was under the impression at the time that it was about multi copy-paste, but I never figured out how it worked. Probably few people did.
In MS Word 97, when I was doing some book editing I used the "Spike" feature for more advanced cut and paste very often. It's still in there http://www.howtogeek.com/213212/how-to-use-the-spike-to-copy...
Isn't that the concept of the "clipboard" that Excel is always asking me about clearing after doing a lot of copy-pasting?
MacOS back in the System 7 era (1990s) had a clipbook utility that shipped with the OS. MacOS had generally better copy and paste support in general though, since it could handle virtually any file format the computer could handle. Text, audio, pictures, even video were all valid in the cut buffer.
Windows has had clipboard format negotiation since the beginning. When an application copies data into the clipboard, it can do so in multiple formats. Each format can be rendered either eagerly or lazily by the application putting data into the clipboard.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...

Applications that wish to get data from the clipboard can then enumerate the available formats and select the format that matches what they can use.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms6...

http://www.mschaef.com/blog/tech/excel/what_is_in_your_clipb...

Microsoft Office shipped with a utility to do that back in the Office XP era. I don't recall it being very popular, and I'm not even sure they still ship it...
You should try a clipboard manager (on Windows, I use 'ditto.' Search for 'ditto clipboard manager.')