emacs-devel
[Top][All Lists]
Advanced

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

Re: Selection changes in revno 100822


From: Chong Yidong
Subject: Re: Selection changes in revno 100822
Date: Sat, 14 Aug 2010 17:52:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> May I suggest to step back and post a clear set of requirements for
> when Emacs should and shouldn't put selected text into the primary
> selection and into the clipboard?  Forget the w32 case for now; let's
> just spell out the requirements for X.

Here is a summary of the current scheme:

  1. Each time the mark is deactivated, the selected text is added to
  the primary selection.  If deactivation occurs as a result of a buffer
  modification, the text that is added is the text in the region prior
  to the modification.

  2. If the region is temporarily active after a command (e.g. after a
  mouse drag or shift selection), the selected text is added to the
  primary selection, even if the mark is not deactivated.

  3. If you deactivate the mark with C-g, the selected text is not added
  to the primary selection.

  4. Any kill command sets clipboard in addition to the kill-ring; any
  yank command inserts the clipboard contents, if possible
  (x-select-enable-clipboard).

  5. mouse-2 yanks primary.

The result of this is that shift-selection and mouse drags set primary,
similar to other X applications.  Also, if you use C-SPC and cursor
motion to select region and then type C-w, that also sets primary,
similar to earlier versions of Emacs.  The latter property is the
"laziness" setting for select-active-regions.


A simpler alternative would be to replace 1-3 with:

  If the region is temporarily active after a command (e.g. after a
  mouse drag or shift selection), the selected text is added to the
  primary selection.

This is much simpler than the first scheme.  However, it does not make
any attempt to treat normal active regions and temporarily active
regions the same; normal active regions (made with C-SPC) never have
anything to do with the primary selection.  This means that if you mark
a region with C-SPC and do C-w, you won't be able to paste the text in
with mouse-2, unlike earlier Emacs versions.



reply via email to

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