all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: rock69 <rocco.rossi@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: No copy when killing
Date: Sat, 14 Jun 2008 03:18:34 -0700 (PDT)	[thread overview]
Message-ID: <0cd27ea8-87cb-4891-8cce-8887be2aa949@e39g2000hsf.googlegroups.com> (raw)
In-Reply-To: b08c0bde-9665-4b38-bac9-a0810957bdae@u36g2000prf.googlegroups.com

On Jun 14, 11:54 am, Xah <xah...@gmail.com> wrote:
> On Jun 14, 2:24 am, rock69 <rocco.ro...@gmail.com> 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/
>
> ☄

Thank you Xah for the detailed explanation. I would indeed like to see
the code if it's not too much trouble. Although, as a matter of fact,
I most likely am going to follow your suggestion, and use another
register when I'm in one of the situations I mentioned.

Thanks again so much :)



  reply	other threads:[~2008-06-14 10:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-14  9:24 No copy when killing rock69
2008-06-14  9:54 ` Xah
2008-06-14 10:18   ` rock69 [this message]
2008-06-14 14:01     ` Xah
2008-06-15 11:27     ` Xah
2008-06-17  6:44       ` Xah
2008-06-16 17:21 ` Steinar Bang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0cd27ea8-87cb-4891-8cce-8887be2aa949@e39g2000hsf.googlegroups.com \
    --to=rocco.rossi@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.