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: Eli Zaretskii
Subject: Re: Selection changes in revno 100822
Date: Mon, 16 Aug 2010 01:23:57 -0400

> From: "Stephen J. Turnbull" <address@hidden>
> Cc: "'Eli Zaretskii'" <address@hidden>,
>     <address@hidden>,
>     <address@hidden>,
>     <address@hidden>,
>     "'David De La Harpe Golden'" <address@hidden>
> Date: Mon, 16 Aug 2010 12:42:32 +0900
> 
> ;; This works in XEmacs, I dunno about Emacs
> (define-key global-map 'mouse-2 #'mouse-yank)

  (global-set-key [mouse-2] 'mouse-yank-at-click)

> The "bogus association" I'm referring to is where Emacsen copy the X
> primary selection to the kill ring under certain circumstances.  This
> tends to pollute the kill ring (or other clipboard feature) with
> ephemeral text.

AFAIU, in GNU Emacs (under the old behavior prior to revno 100822) the
relation between the primary selection and the kill ring was
asymmetrical: killed text would set PRIMARY, but changes in PRIMARY
would not modify the kill ring, _except_ if the user pasted it in some
manner into the current session.  The idea was that if the user pasted
the selection, it is not exactly "ephemeral" for her, and does not
constitute pollution.

> Is X secondary selection available by default in Emacs?

Yes, we have this in mouse.el:

  (global-set-key [M-mouse-1] 'mouse-start-secondary)
  (global-set-key [M-drag-mouse-1] 'mouse-set-secondary)
  (global-set-key [M-down-mouse-1] 'mouse-drag-secondary)
  (global-set-key [M-mouse-3] 'mouse-secondary-save-then-kill)
  (global-set-key [M-mouse-2] 'mouse-yank-secondary)



reply via email to

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