[Top][All Lists]

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

bug#6774: Cut and paste with C-w/mouse-2 not working?

From: Chong Yidong
Subject: bug#6774: Cut and paste with C-w/mouse-2 not working?
Date: Wed, 04 Aug 2010 22:20:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

David De La Harpe Golden <address@hidden> writes:

> The problem is that we may really want the selection bound to
> something _non-current_, if we don't want it to instantly reflect a
> restored boring active region as per above.  And there's the
> two-windows-onto-the-same buffer case to consider

It would be nice to leave boring selections alone, but it doesn't seem
worth it if a lot of new infrastructure has to be added to handle this.

If this problem can't be solved simply, I would prefer to tweak the
behavior of select-active-regions instead.  Here's an idea:

  When the mark is set for a temporarily active region---a region
  created by mouse dragging or shift selection---we keep the current
  behavior; i.e. (x-set-selection 'PRIMARY (current-buffer)).

  Otherwise, do *not* call x-set-selection when setting the mark.

  Before any change to the buffer, save a copy of the region if the mark
  is active, whether or not the region is temporary.

  In deactivate-mark, whether or not the region is temporary, set the
  primary selection to the region that we just deactivated, or to the
  saved copy if that region is empty.

The main difference, as you see, is that non-temporary regions made with
C-SPC would not affect the primary selection until deactivation (either
via buffer change, or commands such as M-w).

reply via email to

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