unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jeremy Maitin-Shepard <jbms@cmu.edu>
To: rms@gnu.org
Cc: tom.horsley@ccur.com, "Jan Djärv" <jan.h.d@swipnet.se>,
	emacs-devel@gnu.org
Subject: Re: Improving X selection?
Date: Mon, 15 Oct 2007 15:26:53 -0400	[thread overview]
Message-ID: <87fy0cdvr6.fsf@jbms.ath.cx> (raw)
In-Reply-To: <E1IhUiH-0002Iw-VK@fencepost.gnu.org> (Richard Stallman's message of "Mon\, 15 Oct 2007 14\:30\:49 -0400")

Richard Stallman <rms@gnu.org> writes:

>     The change, if any, I'd like is that C-y and M-w operates on CLIPBOARD, and
>     that PRIMARY is left to mouse operations.

> ISTR that there are environments where it is bad to use the clipboard
> at all.  I don't remember what they are -- are there people that don't
> use the clipboard at all?

> Also, the basic idea seems mistaken.  When I select something in
> another program, I select it with the mouse because that's the only
> way.  That doesn't mean I should only be able to grab it in Emacs with
> the mouse.  C-y should work.

This is precisely the reason I am currently unsatisfied with the Emacs
selection handling.  I never use the mouse or toolbars in Emacs, but in
some programs (most notably terminal emulators like xterm) I have to use
the mouse to select text.

I'd like there to be some convenient way to paste either the PRIMARY
selection or the CLIPBOARD selection using only keyboard commands.
Currently, setting `x-select-enable-clipboard' to t (the way to get
Emacs to sometimes paste from the clipboard with C-y) has a rather
serious problem: the behavior of C-y becomes unpredictable, because it
uses an unreliable heuristic.  Specifically, it attempts to determine
which of the PRIMARY or CLIPBOARD selections is newer.  Unfortunately,
because it doesn't poll constantly, it has no way of actually
determining this, and instead just chooses the one that changed since
Emacs last checked, and prefers the clipboard if both have changed.  In
practice, much of the time that I am trying to paste something from
another program, both selections have changed since Emacs last checked,
so effectively it always chooses the clipboard, which means that pasting
from terminals does not work well.

It seems that at the very least this unreliable heuristic in Emacs
should be replaced by something better, because I can't see how it is
very useful for anyone.  If it is left in, there should at least be a
way to choose alternative behavior (like "only use the clipboard").

Perhaps the only real solution for me is to write a program that
effectively copies the text in PRIMARY to the CLIPBOARD, and bind this
program to some key like mod4-y.

-- 
Jeremy Maitin-Shepard

  reply	other threads:[~2007-10-15 19:26 UTC|newest]

Thread overview: 95+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071012105022.6c8b174a@tweety>
2007-10-14 16:29 ` Improving X selection? Richard Stallman
2007-10-14 17:25   ` Jeremy Maitin-Shepard
2007-10-15  6:19     ` Jan Djärv
2007-10-15  6:21       ` Jan Djärv
2007-10-15  6:41       ` Eli Zaretskii
2007-10-15  6:55       ` Miles Bader
2007-10-15  8:16         ` Jan Djärv
2007-10-15 14:21       ` Stefan Monnier
2007-10-15 18:30       ` Richard Stallman
2007-10-15 19:26         ` Jeremy Maitin-Shepard [this message]
2007-10-15 20:03           ` Andreas Schwab
2007-10-15 20:22             ` Jeremy Maitin-Shepard
2007-10-16  8:02               ` Frank Schmitt
2007-10-16  7:27           ` Jan Djärv
2007-10-16 10:08             ` René Kyllingstad
2007-10-16 13:15               ` Stefan Monnier
2008-08-18 15:29                 ` René Kyllingstad
2008-08-18 18:47                   ` David De La Harpe Golden
2008-08-18 19:16                 ` David Hansen
2008-08-19  8:06                   ` Frank Schmitt
2008-08-25 15:34                     ` Juri Linkov
2008-08-25 15:56                       ` Frank Schmitt
2008-08-28 17:45                         ` David De La Harpe Golden
2008-08-28 17:58                           ` Frank Schmitt
2008-08-28 18:19                             ` David De La Harpe Golden
2008-08-29  5:53                               ` David Hansen
2008-08-30  4:08                                 ` David De La Harpe Golden
2008-08-31  7:41                                   ` David Hansen
2008-08-20 22:41                   ` David De La Harpe Golden
2008-08-25 15:34                     ` Juri Linkov
2008-08-26  3:09                       ` David Hansen
2008-08-26  8:03                         ` David De La Harpe Golden
2008-08-26  8:41                           ` David Hansen
2007-10-16  7:26         ` Jan Djärv
2007-10-15 10:20 Horsley, Tom
2007-10-15 11:06 ` Jan Djärv
2007-10-16  4:10 ` Richard Stallman
2007-10-16 23:29   ` David De La Harpe Golden
2007-10-17  1:05     ` David De La Harpe Golden
2007-12-25 21:13     ` Richard Stallman
2008-01-28 19:52       ` David De La Harpe Golden
2008-01-29  0:59         ` David De La Harpe Golden
2008-02-01 19:15           ` David De La Harpe Golden
2008-02-02  0:17             ` David De La Harpe Golden
2008-02-03 11:38               ` David De La Harpe Golden
2008-02-03 12:44                 ` Jan D.
2008-02-03 13:12                   ` David De La Harpe Golden
2008-02-04 21:02                     ` David De La Harpe Golden
2008-02-05  3:38                       ` David De La Harpe Golden
2008-02-05  7:08                       ` Jan Djärv
2008-02-07  3:57                         ` David De La Harpe Golden
2008-02-07  4:23                           ` Miles Bader
2008-02-07  4:59                             ` David De La Harpe Golden
2008-02-07  9:07                           ` Jason Rumney
2008-02-07 16:32                             ` David De La Harpe Golden
2008-02-07 17:11                               ` David De La Harpe Golden
2008-02-07 17:13                               ` Jason Rumney
2008-02-07 19:46                                 ` Stefan Monnier
2008-02-10 18:42                                 ` Richard Stallman
2008-02-11 17:46                                   ` David De La Harpe Golden
2008-02-07 17:25                               ` Stefan Monnier
2008-02-07 17:39                                 ` David De La Harpe Golden
2008-02-07 17:51                                   ` David De La Harpe Golden
2008-02-07 19:54                                   ` Stefan Monnier
2008-02-07 15:14                           ` Stefan Monnier
2008-02-07 16:15                             ` David De La Harpe Golden
2008-02-07 18:01                               ` Stephen J. Turnbull
2008-02-07 18:07                                 ` David De La Harpe Golden
2008-02-07 19:21                                   ` Stephen J. Turnbull
2008-02-08  1:19                                     ` Miles Bader
2008-02-08  1:42                                       ` David De La Harpe Golden
2008-02-07 18:22                                 ` David De La Harpe Golden
2008-02-07 19:45                                   ` Stefan Monnier
2008-02-07 20:39                                     ` David De La Harpe Golden
2008-02-07 21:25                                       ` Stephen J. Turnbull
2008-02-07 21:41                                         ` David De La Harpe Golden
2008-02-08  0:22                                           ` Stephen J. Turnbull
2008-02-08  1:26                                             ` David De La Harpe Golden
2008-02-07 22:43                                       ` Stefan Monnier
2008-02-08  2:50                                         ` David De La Harpe Golden
2008-02-08 14:41                                           ` Stefan Monnier
2008-02-08 15:21                                             ` David De La Harpe Golden
2008-02-17  3:38                                             ` David De La Harpe Golden
2008-02-17  3:55                                               ` David De La Harpe Golden
2008-02-07 21:01                                     ` Tom Horsley
2008-02-07 21:18                                       ` David De La Harpe Golden
2008-02-07 21:36                                         ` Tom Horsley
2008-02-07 21:40                                           ` David De La Harpe Golden
2008-02-07 22:51                                       ` Stefan Monnier
2008-02-03 16:18             ` Richard Stallman
2008-02-03 18:29               ` David De La Harpe Golden
2008-02-05  5:58               ` David De La Harpe Golden
2008-02-05  6:23                 ` Miles Bader
2008-02-05  6:56                   ` David De La Harpe Golden
2008-02-03 16:18           ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fy0cdvr6.fsf@jbms.ath.cx \
    --to=jbms@cmu.edu \
    --cc=emacs-devel@gnu.org \
    --cc=jan.h.d@swipnet.se \
    --cc=rms@gnu.org \
    --cc=tom.horsley@ccur.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).