[Top][All Lists]

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

RE: delete-selection-mode as default

From: Drew Adams
Subject: RE: delete-selection-mode as default
Date: Sun, 16 Sep 2018 13:14:35 -0700 (PDT)

> > > > The secondary selection doesn't have all these problems,
> > > > so it's a good example.
> > >
> > > The secondary selection can only be defined by mouse gestures.
> >
> > In vanilla Emacs, yes. But not if you use `second-sel.el'.
> >
> > You can define (set) it in several ways using the keyboard (suggested keys
> shown):
> >
> > * Start secondary with `C-x C-M-SPC' (`set-secondary-start').
> > * End secondary with `C-x C-M-<return>' (`secondary-save-then-kill').
> Which ends the secondary at point position, something that was the
> main point of this discussion.

That's not the point you made, of the secondary only being
defined by mouse gestures. My reply is to that point.

> Can you envision a way of setting a selection without the mouse,
> except when point is at one of the two ends of the selection?

Of course I can. It can easily be set between any two positions.
Neither end need have any relation to point.

(And even in asking that you switched from "mouse gestures" to

(defun my-set-secondary (beg end)
  "Set the secondary selection to start at BEG and end at END."
  (setq mouse-secondary-start  (make-marker))
  (move-marker mouse-secondary-start beg)
  (move-overlay mouse-secondary-overlay beg end))

reply via email to

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