[Top][All Lists]

[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: Sat, 14 Aug 2010 14:20:45 +0300

> Date: Sat, 14 Aug 2010 11:46:53 +0200
> From: Jan Djärv <address@hidden>
> CC: Chong Yidong <address@hidden>, address@hidden
> > I'm utterly confused now.  The doc string of x-select-enable-primary
> > says:
> >
> >    Non-nil means cutting and pasting uses the primary selection.
> >
> > According to this, the value of nil, the current default, means
> > "cutting and pasting do NOT use the primary selection", right?
> >
> > But OTOH, the NEWS entry says something contradictory:
> >
> >    The way Emacs interacts with the clipboard and primary selection, by
> >    default, is now similar to other X applications.  In particular, kill
> >    and yank use the clipboard, in addition to the primary selection.
> >
> > The last sentence seems to say that kill and yank still do use the
> > primary selection, and _in_addition_ also use the clipboard.  If
> > that's the intent of this text, then it seems to be in contradiction
> > with the new default of x-select-enable-primary.
> The name is bad.  The way other X apps doit is that selected text (i.e. just 
> selected, not cut/copied) goes to PRIMARY.
> Then when you cut/copy, it goes to CLIPBOARD also.
> So the name x-select-enable-primary is really x-cut/copy-into-primary AFAIK.

Thanks, this clears up quite a bit of the confusion.  So would it be
correct to modify the doc string of x-select-enable-primary to say

   Non-nil means cutting text sets the primary selection.
   When the value is nil, the primary selection is still set by
   selecting the text.

and change the NEWS entry to say this:

    In particular, kill and yank use the clipboard, while the primary
    selection is by default set as soon as text is selected, but not
    when text is killed.


> > One other issue we should consider IMO is what is the semantics of
> > mouse-2 in sessions that support the mouse, but cannot access
> > selections.  One such example is a TTY with a GPM mouse.  I don't have
> > access to such a build of Emacs, but I'm quite sure mouse-2 there will
> > either do nothing or signal an error.  That's hardly a good thing,
> > because previously it would yank from the kill ring.
> >
> Maybe Emacs should use some internal notion of PRIMARY on those platforms
> where it don't exist.  That way select and mouse-2 selects and insterts text
> as on X.  But without touching the kill ring.

Why is it important not to touch the kill ring?

> > Thanks in advance for helping me become less confused.
> It is very confusing.  There are special cases depending on how the selection 
> was made, and then badly named variables increase the confusion.  Not to 
> mention trying to handle multiple platforms with differing capabilities.

It seems to me that on platforms that have only one selection (the
clipboard), selecting text should do nothing by default, while cutting
should set the clipboard.  And there should be a variable to
optionally set the clipboard when the text is selected.  (Do we
already have such a variable?)  Do you agree?

reply via email to

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