From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "David De La Harpe Golden" <david.delaharpe.golden@gmail.com>
Cc: "Horsley, Tom" <Tom.Horsley@ccur.com>,
"Stephen J. Turnbull" <stephen@xemacs.org>,
"Jan D." <jan.h.d@swipnet.se>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Improving X selection?
Date: Thu, 07 Feb 2008 14:45:46 -0500 [thread overview]
Message-ID: <jwv7ihgr398.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <8e24944a0802071022i2b259c5fka14f191a3c519157@mail.gmail.com> (David De La Harpe Golden's message of "Thu, 7 Feb 2008 18:22:07 +0000")
> Would be nice to find one that didn't induce an extra hyphen is all -
> interprogram-cut-function
> interprogram-paste-function
> interprogram-highlight-function
> interprogram-highlight-insert-function
The name "interprogram-highlight-function" sounds wrong: the user does
not highlight the text, she selects it (the highlighting is done by the
application to help the user figure out what is selected). So I suggest
`interprogram-select-function' for it. For the last one, I suggest we
use `interprogram-insert-function', tho I'm not completely sure
I understand what it's intended to do.
The following is some random analysis of the situation, for my
own good.
From what I can tell, there are 4 kinds of selections:
- C-SPC + mouse movement. I.e. select-only.
- same plus C-w.
- selection with the mouse.
- one of the above plus "copy" from the menu.
No 4 should always use the CLIPBOARD.
No 3 should always use the PRIMARY (plus optionally CLIPBOARD)
No 2 may optionally use PRIMARY (plus optionally CLIPBOARD)
No 1 should use neither or at most PRIMARY.
I believe that currently No 2 and No 3 are always handled in the same
way, and I don't know if we want to bother separating them.
I also believe that the use of CLIPBOARD for 2 and 3 depends on
x-select-enable-clipboard.
You're suggesting to allow PRIMARY for No 1 via `select-active-regions'?
Oh, I see it already exists, so you're just trying to fix it so it
works more reliably, is that right?
Why do you need `interprogram-highlight-function'? Can't you just use
(let ((x-select-enable-clipboard nil))
(kill-ring-save beg end))
like clipboard-kill-ring-save does?
On the lighins side, I understand even less why there's a need for
interprogram-highlight-insert-function. We have 3 different situations:
- C-y
- mouse-2
- "Paste" from the menu
For all three cases, the first question is "where does the text come from":
No 3 should always use the CLIPBOARD then PRIMARY then kill ring.
No 2 should use the CLIPBOARD only if x-select-enable-clipboard is set.
No 1 is identical except it may also not check PRIMARY either.
In all 3 cases a further question is: if the yanked text comes from the
CLIPBOARD or the PRIMARY, should the text be added to the kill-ring?
This last question is the one you seem to want to address, but I don't
see why you need interprogram-highlight-insert-function for it, instead
of just a boolean config var. And to be honest: I doubt that there's
enough of a need for this level of control to justify its introduction;
it's easy enough to use M-y to get back to the previous item.
This said, if we introduce such a "copy-interprogram-text-to-kill-ring"
config var, we could give it 3 values: either the kill-ring is never
affected, or the kill-ring is filled from CLIPBOARD/PRIMARY upon yank,
or the kill-ring is not only filled upon yank but also upon kill
(that's a patch I suggested a few months back: before pushing something
to the CLIPBOARD/PRIMARY, check the previous value, and if it's not
ours, stash it in kill-ring, thus integrating the kill-ring with the
PRIMARY/CLIPBOARD even more tightly).
Stefan
next prev parent reply other threads:[~2008-02-07 19:45 UTC|newest]
Thread overview: 101+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 10:20 Improving X selection? 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 [this message]
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 13:26 ` OT [was Re: Improving X selection?] Tom Horsley
2008-02-08 15:30 ` David De La Harpe Golden
2008-02-08 16:07 ` OT Stefan Monnier
2008-02-08 16:43 ` OT David De La Harpe Golden
2008-02-08 14:41 ` Improving X selection? 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
[not found] ` <8e24944a0802071042u43d68f04pc8492ad8ce07aa18@mail.gmail.com>
2008-02-07 18:44 ` Fwd: " David De La Harpe Golden
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
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 14:50 Tom Horsley
2007-10-14 16:29 ` 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
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv7ihgr398.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=Tom.Horsley@ccur.com \
--cc=david.delaharpe.golden@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
--cc=rms@gnu.org \
--cc=stephen@xemacs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.