[Top][All Lists]

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

bug#27530: patch to cut and copy secondary

From: Drew Adams
Subject: bug#27530: patch to cut and copy secondary
Date: Thu, 29 Jun 2017 06:41:55 -0700 (PDT)

> I found secondary can be used as another region.

Good initiative.

(But another "selection", not another region.)

And a selection that is (obviously) not affected by the
cursor position.  It persists even as you move the cursor.
That's the main difference from the region (advantages,

> Here I send a patch to cut and copy secondary as if region
> (when region does not exist).

FWIW, I suggested similar things to Emacs devel long ago.
I use the secondary selection a *lot*.

See https://www.emacswiki.org/emacs/second-sel.el,

You might want to consider incorporating some or all of
what is there.  I and others have been using it since 2008.

IMO, the first, and simplest, improvement to add to Emacs is
a way to create and yank the secondary selection using only
the keyboard, not the mouse.  My guess is that the reason
more users do not use the secondary selection is that there
are no keyboard keybindings for it.

> +(defun mouse-secondary-exists-p ()
> +  "Return location of mouse-secondary-overlay when exists in current
> buffer."

Name probably shouldn't end in `-p' if the return value is
mainly not a Boolean.  Non-nil here means overlay limits.

> +(defun mouse-set-mark-and-point-from-secondary ()

Cf. `secondary-to-primary'.

> +(defun mouse-set-secondary-from-region ()

Cf. `primary-to-secondary'.

`second-sel.el' also gives the secondary selection its own
history, `secondary-selection-ring', analogous to `kill-ring'.


reply via email to

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