On Thursday, December 09, 2004, at 02:27AM, Jarkko Laine jarkko@jlaine.net wrote:
On 9.12.2004, at 01:18, Allan Odgaard wrote:
Ah, but macros do not require you to write any code.
Try this (menu choices): Automation -> Start Macro Recording Edit -> Select -> Line Edit -> Cut Automation -> Stop Macro Recording
Now you have a macro that cuts the current line. You can then select: Automation -> Save Scratch Macro
Name it ?Yank? and press ctrl-y while in the key equivalent field. Then you can use ctrl-y to cut the current line.
Ctrl-y is not "cut line" in emacs, that's what ctrl-k does. Ctrl-y then pastes what has been saved to the kill buffer/clipboard by ctrl-k, ctrl-w (cut selection) or M-w (copy selection).
I think what was desired was that if you kill several lines with ctrl-k, you could paste them all with one keystroke using ctrl-y. This would make it a bit harder to record as a macro (and would effectively mean redefining ctrl-k, too, since it doesn't effect clipboard at the moment).
Indeed, I was totally off. I meant ctrl-k, not ctrl-y. At the moment, ctrl-k can only remove lines if they are soft wrapped and do not send them to a buffer to be recalled by ctrl-y. I'll try the suggestion by Allan, though.
Nomand