I looked in paredit.el and didn't find this...
but wouldn't it be nice to have an equivalent of M-space and then M-w?
There are times when I want to copy an entire sexp to the kill ring and
then insert it later, without deleting it at the original location.
I'm not sure what you mean by M-space then M-w, but placing point on an
opening paren and using mark-sexp (ESC ··@) will mark the entire
expression. You can then use M-w to save it to the kill-ring.
You can also double click on the opening paren to mark the expression.
Jason Kantz wrote:
> I'm not sure what you mean by M-space then M-w, but placing point on an
> opening paren and using mark-sexp (ESC ··@) will mark the entire
> expression. You can then use M-w to save it to the kill-ring.
>
> You can also double click on the opening paren to mark the expression.
Close enough! thanks!
On 17 Jan 2006 13:00:39 -0800, "Jonathon McKitrick"
<···········@bigfoot.com> tried to confuse everyone with this message:
>I looked in paredit.el and didn't find this...
>but wouldn't it be nice to have an equivalent of M-space and then M-w?
>
>There are times when I want to copy an entire sexp to the kill ring and
>then insert it later, without deleting it at the original location.
>
I made a keyboard macro to solve this. It became one of the most common
key combinations that I use.
(fset 'copy-sexp
[?\C-\M- ?\M-w])
(global-set-key [24 99] 'copy-sexp) ;;Binds to C-x c
--
|WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
|(except for ending slavery, ||mail: grue at mail.ru ================ |
| fascism and communism) ||============= http://grue3.tripod.com |
|...and Saddam's dictatorship |`----------------------------------[4*72]
Here's another one that I use - no keybinding etc required, just
"behavioural modifications". I just do in quick succession, kill-sexp &
paste sexp (back in the same place), then I have it in the kill-ring.
Quickly C-k, then C-y, yeah? I do that a lot. It's inelegant, but it
does save on my limited key-bindings.
Been thinking about something that does kill-previous-sexp though.
Perhaps that could be useful, hmm, don't know. It's always hard trying
to figure out the most comfortable, or easily remember key-binding....
"senator" <···············@gmail.com> writes:
>
> Here's another one that I use - no keybinding etc required, just
> "behavioural modifications". I just do in quick succession, kill-sexp &
> paste sexp (back in the same place), then I have it in the kill-ring.
> Quickly C-k, then C-y, yeah? I do that a lot. It's inelegant, but it
> does save on my limited key-bindings.
>
> Been thinking about something that does kill-previous-sexp though.
C-M-Delete is what is built-in to Emacs.
> Perhaps that could be useful, hmm, don't know. It's always hard trying
> to figure out the most comfortable, or easily remember key-binding....
--
Thomas A. Russ, USC/Information Sciences Institute
>> Here's another one that I use - no keybinding etc required, just
>> "behavioural modifications". I just do in quick succession, kill-sexp &
>> paste sexp (back in the same place), then I have it in the kill-ring.
>> Quickly C-k, then C-y, yeah? I do that a lot. It's inelegant, but it
>> does save on my limited key-bindings.
Beware, this has problems with successive sexp-kills (they get combined
into the same "clipboard", so pasting again will paste all the sexps
previously killed consecutively, not just the last one.
>
>C-M-Delete is what is built-in to Emacs.
>
Ouch, that shut-down my x-windows abruptly...
I've settled on a more comfortable key-binding. Thanks for the tip.
(define-key slime-mode-map (kbd "C-<backspace>") 'backward-kill-sexp)
This is now inside my
(defun myslimemappings () ... lots of define-keys ...)
which gets hooked on to
(add-hook 'emacs-lisp-mode-hook 'myslimemappings)
(add-hook 'lisp-mode-hook 'myslimemappings)
for those who might be interested.
Okies, keep cdring people.
"senator" <···············@gmail.com> writes:
>> C-M-Delete is what is built-in to Emacs.
>
> Ouch, that shut-down my x-windows abruptly...
Yup.
[Emacs 22 (CVS) etc/NEWS]
** The old bindings C-M-delete and C-M-backspace have been
deleted, since there are situations where one or the other will
shut down the operating system or your X server.
--
Johan Bockgård
Timofei Shatrov wrote:
> I made a keyboard macro to solve this. It became one of the most common
> key combinations that I use.
>
> (fset 'copy-sexp
> [?\C-\M- ?\M-w])
> (global-set-key [24 99] 'copy-sexp) ;;Binds to C-x c
Perfect. Thanks!
> |WAR HAS NEVER SOLVED ANYTHING|,----- Timofei Shatrov aka Grue---------.
> |(except for ending slavery, ||mail: grue at mail.ru ================ |
> | fascism and communism) ||============= http://grue3.tripod.com |
> |...and Saddam's dictatorship |`----------------------------------[4*72]
Hear, hear.