GNU bug report logs - #7077
24.0.50; mouse-drag-copy-region - name should say copy as kill

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Mon, 20 Sep 2010 20:38:02 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 7077 <at> debbugs.gnu.org
Subject: bug#7077: 24.0.50; mouse-drag-copy-region - name should say copy as kill
Date: Sat, 2 Jul 2011 08:46:24 -0700
> > The name does not say anything about copying to the kill 
> > ring.  The name should, like `kill-ring-save' and
> > `copy-region-as-kill', say that this copies to the kill ring.
> >
> > Suggestion: `mouse-drag-copy-region-as-kill' or
> > `mouse-drag-kill-ring-save'.
> 
> I think that sounds reasonable, but, on the other hand, is it really
> necessary for all these functions to mention "kill" in the function
> name?  It seems intuitive (to me) that `mouse-drag-copy-region' puts
> stuff in the kill ring -- what else would it do?

1. "Copy" can mean a couple different things.  One misunderstanding might be to
copy the region to another location in a buffer - a la copy + paste.

2. It's helpful for Emacs to be consistent and put important Emacs terms into
command names that involve them.

In particular, this makes it easy to find them using things like `apropos'.
This principle is at least as old as the Unix `apropos' command and similar.  We
generally try to have Emacs commands that deal with buffer use `buffer' in the
name; those that deal with files use `file'; with yanking use `yank', etc.

It is not so obvious, especially to a newbie, that `mouse-drag-copy-region'
copies to the `kill-ring'.  Especially now that there are multiple copy-target
thingies such as the clipboard, paste buffer, interprogram XYZ, etc. (I don't
know the correct names).

In the beginning Emacs had only the `kill-ring' for copying and pasting, but
even in that context it would be helpful for a command such as this to have a
name similar to `kill-ring-save' and `copy-region-as-kill', suggesting that it
copies to the kill ring.





This bug report was last modified 14 years and 14 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.