help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: No copy when killing


From: Xah
Subject: Re: No copy when killing
Date: Sat, 14 Jun 2008 02:54:45 -0700 (PDT)
User-agent: G2/1.0

On Jun 14, 2:24 am, rock69 <address@hidden> wrote:
> Is there some way to disable copying to the clipboard when deleting
> something (ex. with M-d or C-k)? I'm asking this because I often find
> myself copying something and then deleting successive lines, and when
> I have to paste what I had previously copied, it's really annoying to
> have to scroll through with C-y M-y.

i doubt there's a buildin customization to let you set that pref.

You might need to write your own function to do delete text without
putting things in ring. (the elisp would be trivial... pls ask if you
want the code)

-------------------------

however, what you want is prob best done by using emacs's so-called
“register”, which basically allow you to have multiple clipborads.

select a region, then do M-x copy-to-register (C-x r x). Then type 1
(as the name of your register)
To paste that, type M-x insert-register (C-x r g), then type 1.

You can of course bind these to shortcuts with a simple elisp, so
that, for example, M-1 copy region to clipboard 1, M-S-1 paste it from
clipboard 1. Similar for 2, 3, etc.

-------------------------

... i've been thinking whether emacs behavior of M-d, C-k etc
automatically put things into kill-ring is a efficient mode of
operation, as opposed to not have these operations auto put into kill-
ring and only copy/cut (M-w,C-w) does. But just never spent the time
to seriously think about this.

I'm used to the emacs way anyhow for 10 years and didn't find any prob
with it. However, this doesn't imply this emacs way is more
efficient... just habit. (of course, emacs old timers are likely to
say it's that way because decades of hacker usage find it to be
efficient and blab blab... which often has no scientific basis
whatsoever and in fact some of emacs ways, such as its default
keybindings and its undo behavior, are very operatively inefficient.)

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]