unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: cyd@stupidchicken.com, 6774@debbugs.gnu.org, angelo.graziosi@alice.it
Subject: bug#6774: Cut and paste with C-w/mouse-2 not working?
Date: Fri, 06 Aug 2010 21:21:31 +0900	[thread overview]
Message-ID: <tl7eiecrkxg.fsf@m17n.org> (raw)
In-Reply-To: <83iq3ovwv0.fsf@gnu.org> (message from Eli Zaretskii on Fri, 06 Aug 2010 13:50:11 +0300)

In article <83iq3ovwv0.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > > But that would mean setting the selection each time the user does a
> > > C-w or M-w or any other action that pushes text on the kill ring,
> > > won't it?
> > 
> > Isn't that what Emacs has been doing for the last 10 years?

> Not as far as I know.  Maybe I was living in some pipe dream, but I
> always thought the actual copying happened only when some other
> application actually requests the selection.

The following is my current understanding about Emacs 23 and
the earlier.

C-w or M-w leads to call of interprogram-cut-function which
is usually bound to x-select-text.  On X, it does rather
complicated things.

At first, it copies the data string to CUT_BUFFER0.  Each
window of X can have properties and CUT_BUFFER0 is one of
them.  So, the data is transferred from Emacs to X server,
but it's not the inter-client copying.  This is a semi-heavy
process.

Next, if x-select-enable-primary is non-nil (the default is
t), Emacs declares to own PRIMARY selection.  In this case,
the data string is not copied but just saved in the internal
list Vselection_alist.  This is a light process.  The saved
data is transferred to another client later when requested.

At last, if x-select-enable-clipboard is non-nil (the
default is nil), Emacs declares to own CLIPBOARD selection.
The treatment of the data string is the same as above,
i.e. not copied.  But!, if a clipboard client is also
running (it seems that is the default on Ubuntu), as soon as
Emacs owns CLIPBOARD selection, it requests to get CLIPBOARD
selection data from Emacs, and the data is transferred from
Emacs to the clipboard client.  This is the inter-client
copying, and a heavy process.

So, Emacs had been doing some kind of copying on each C-w
and M-w, but the default setting avoided the heaviest process.

---
Kenichi Handa
handa@m17n.org





  reply	other threads:[~2010-08-06 12:21 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-01 22:04 bug#6774: Cut and paste with C-w/mouse-2 not working? Angelo Graziosi
2010-08-02  4:12 ` David De La Harpe Golden
     [not found]   ` <4C56C8F0.2010104@alice.it>
2010-08-02 14:52     ` David De La Harpe Golden
2010-08-02 19:41   ` Chong Yidong
2010-08-02 20:30     ` David De La Harpe Golden
2010-08-02 20:33       ` David De La Harpe Golden
2010-08-02 20:53       ` David De La Harpe Golden
2010-08-02 20:59       ` Chong Yidong
2010-08-02 21:35         ` David De La Harpe Golden
2010-08-02 22:26           ` David De La Harpe Golden
2010-08-05  2:20           ` Chong Yidong
2010-08-05 23:50             ` David De La Harpe Golden
2010-08-06  7:43               ` Eli Zaretskii
2010-08-06  9:13                 ` Stefan Monnier
2010-08-06 10:50                   ` Eli Zaretskii
2010-08-06 12:21                     ` Kenichi Handa [this message]
2010-08-06 13:17                       ` Jan Djärv
2010-08-06 20:23                         ` David De La Harpe Golden
2010-08-06 20:17                     ` David De La Harpe Golden
2010-08-06 15:28               ` Chong Yidong
2010-08-06 21:05                 ` David De La Harpe Golden
2010-08-07 19:50                   ` Chong Yidong
2010-08-07 23:05                     ` David De La Harpe Golden
2010-08-09  2:55                       ` Chong Yidong
2010-08-09 11:43                         ` Stefan Monnier
2010-08-09 17:19                           ` Jan Djärv
2010-08-10  7:29                             ` Stefan Monnier
2010-08-10 14:01                               ` Jan Djärv
2010-08-10 15:54                                 ` Stefan Monnier
2010-08-10 17:59                                   ` Jan Djärv
2010-08-11  7:46                                     ` Stefan Monnier
2010-08-11 16:06                                       ` Jan Djärv
2010-08-11 20:17                                         ` Stefan Monnier
2010-08-11 21:26                                           ` Jan Djärv
2010-08-11 21:32                                             ` Stefan Monnier
2010-08-12  3:54                                       ` Kenichi Handa
2010-08-12  7:43                                         ` Jan Djärv
2010-08-12  7:51                                           ` Kenichi Handa
2010-08-12  8:29                                         ` Stefan Monnier
2010-08-12 12:14                                           ` Kenichi Handa
2010-08-12 16:09                                             ` Stefan Monnier
2010-08-12 17:11                                               ` Jan Djärv
2010-08-13 10:38                                                 ` Stefan Monnier
2010-08-13 11:29                                                   ` Eli Zaretskii
2010-08-13  6:18                                               ` Kenichi Handa
2010-08-13 10:40                                                 ` Stefan Monnier
2010-08-16  8:16                                                   ` Kenichi Handa
2010-08-16  8:51                                                     ` Jan Djärv
2010-08-17  1:44                                                       ` Kenichi Handa
2010-08-17  5:52                                                         ` Jan Djärv
2010-08-17  7:17                                                           ` Eli Zaretskii
2010-08-17  8:24                                                             ` Jan Djärv
2010-08-17 10:26                                                               ` Eli Zaretskii
2010-08-17 11:43                                                           ` Kenichi Handa
2010-08-17 12:14                                                             ` Stefan Monnier
2010-08-17 12:57                                                               ` Kenichi Handa
2010-08-18  7:24                                                                 ` Stefan Monnier
2010-08-17 20:59                                                               ` David De La Harpe Golden
2010-08-18  7:25                                                                 ` Stefan Monnier
2010-08-07 23:08                     ` Angelo Graziosi
     [not found]       ` <mailman.23.1280783288.5118.bug-gnu-emacs@gnu.org>
2010-08-03 14:34         ` Miles Bader
2010-08-03 15:15           ` David De La Harpe Golden
2010-08-03 15:31             ` Miles Bader
2010-08-03 15:45               ` David De La Harpe Golden
2010-08-03 16:02                 ` Miles Bader
2010-08-04 18:02                   ` Stefan Monnier
2010-08-04 18:25                     ` Drew Adams
2010-08-04 21:10                       ` David De La Harpe Golden
2010-08-04 21:36                         ` Drew Adams
2010-08-05  0:17                           ` Chong Yidong
2010-08-05  0:24                             ` Drew Adams
2010-08-05  0:33                               ` Chong Yidong
2010-08-05  0:40                                 ` Drew Adams
2010-08-02 13:33 ` Angelo Graziosi

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=tl7eiecrkxg.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=6774@debbugs.gnu.org \
    --cc=angelo.graziosi@alice.it \
    --cc=cyd@stupidchicken.com \
    --cc=eliz@gnu.org \
    /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).