On Sat, 23 Mar 2003, Julien Olivier wrote: > > Emacs actually doesn't use the X clipboard in the way you might think. > > Emacs has its own set of buffers, called the "kill ring." The sequence of > > keystrokes that does what you want is: > > > > Write "Blah" > > Select "Blah" > > CTRL-W CTRL-Y (Cut and paste in place, i.e., copy)) > > Write "This is a test" > > Select "test" > > CTRL-W CTRL-Y CTRL-Y (Cut "test", paste "test" (last cut), paste "Blah" > > instead (previous cut). > > > > You would also want to know about ALT-X Replace-String, which replaces > > all occurrences of one string with another to the end of the file and > > ALT-X Query-Replace-String, which replaces occurrences one at a time. > > > > Furthermore, ALT-X Replace-Regexp and ALT-X Query-Replace-Regexp replace > > patterns with patterns, which is an extremely powerful thing to be able to > > do. > > > > Waow !? Am I the only one to find it VERY complicated ? I mean CTRL-W > CTRL-Y, then CTRL-W CTRL-Y CTRL-Y just to do a copy/paste... I think > it's simpler to actually write the text manually :)
It might be simpler in some cases. But like much software (including *nix itself), it's not so complicated if you approach it with the right mindset. In this case, what's happening is this: each time you kill something, it is copied to the front of the kill ring. When you yank, the entry at the front of the kill ring is pasted. If you yank again, the text just pasted is replaced by the next older entry in the kill ring. More consecutive yanks work back through the kill ring. It's a ring, though, so yanking enough times will eventually get you to the front again, and once the ring is full, the oldest entries will be overwritten by new kills. Once you know how it works, the key sequences are natural, not complicated. BTW, there is a copy command so you don't need to kill and yank to get something into the kill ring, but you'd have to map it to a single keystroke yourself, as it is not done by default. Also, don't forget the other substitution commands, which can be more appropriate in somne circumstances. > > > There's an O'Reilly book on emacs that might be a good start. > > > > > Well, as I said: Emacs is too complicated for me I think. Don't get it > wrong: I think it's a great tool because it has a lot of (hidden) > functions and can be customized etc... but, for me, needing to learn > tons of keybindings or needing to learn LISP just to use a code editor > is too much. I prefer focusing on learning the language of the code I'm > writing :) > > Again, no offence to Emacs developers. Each user has his own needs and > Emacs might be the best tools for some of them. For me, jEdit is just > better than Emacs as I can use it without reading a book and remembering > everything. Well, editors are one of the most popular religious issues on any *nix mailing list. Personally, I find vi's editing modes annoying as heck and when I want a powerful or unusual function, I'm pretty sure I can find it or construct it in emacs, but others find the emacs key bindings equally awful and its kitchen-sink mentality offensive to their aesthetic sensibilities. Actually, I wouldn't mind something a little lighter weight, as long as it included all the emacs functionality that I do use 8^). -- Matthew Saltzman Clemson University Math Sciences [EMAIL PROTECTED] http://www.math.clemson.edu/~mjs -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list