all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Miles Bader'" <miles@gnu.org>, <emacs-devel@gnu.org>
Subject: RE: users and selection changes
Date: Fri, 15 Oct 2010 09:30:32 -0700	[thread overview]
Message-ID: <EA5EB7AC0B2B4651BC1B44310929EEC9@us.oracle.com> (raw)
In-Reply-To: <buo62x3bxbw.fsf@dhlpc061.dev.necel.com>

> The _problem_ with setting x-select-enable-primary is that now all
> _Emacs_ selections end up in the kill ring too, which is almost
> certainly Not What You Want.

I'm on Windows, so I don't have (or need) option `x-select-enable-primary', but
I just looked at its doc string:

"Non-nil means cutting and pasting uses the primary selection."

First, one might wonder what it means by "cutting and pasting".  Is it speaking
about cutting and pasting inside Emacs or outside Emacs?  Does it really mean
kill and yank perhaps?  Does Emacs mouse-pasting and mouse-cutting count (where
the kill ring might not be involved)?  Pretty unclear, to me.

Anyway, more important is that the doc string says nothing about what you just
said, which seems like important info.  All the more so since the option name
does not suggest anything about it (the kill ring).

Seems like the doc string should say explicitly what you said: non-nil means
that all Emacs selections (including mouse selections) are copied to the kill
ring.  If that's true, I cannot believe it was not mentioned in the doc string.

BTW, the Customize :group for this option is `killing', but nothing is said for
it about killing.  And even the manual (`(emacs)Cut/Paste Other App') is
incomplete.  It says only that the option controls what gets yanked.  It does
not say explicitly that it controls what gets put on the kill ring.  Yes,
yanking only yanks kills, but this could be made clearer.

> My idea to get around that problem (expressed on the gnu.emacs.help
> newsgroup) is to add a feature that makes emacs put all selections
> _except_ those originating from itself (the current Emacs process) on
> the kill ring.

I guess you mean that all selections made outside Emacs would automatically be
added to the kill ring (but some Emacs selections could also still be added to
the kill ring).

As an option, that might be useful.  But users would need to be able to control
it.  Some users (including me) might not want everything they select outside
Emacs to end up on the kill ring.

And how would that work?  When you select some text outside Emacs, how does it
put on the Emacs kill ring?  And for which Emacs session - all of them?

> That, would basically make things similar to how they used to be

How so?  I don't recall that Emacs ever added all outside selections to the kill
ring. Or did you mean outside copies (e.g. `C-c' on Windows) instead of outside
selections (e.g. using mouse)?

> [I don't know if this behavior should associated with non-nil
> x-select-enable-primary by default, or only upon some special value of
> x-select-enable-primary, e.g. (setq x-select-enable-primary 'others).
> 
> It _is_ somewhat quirky (although very convenient) behavior, which
> argues for "special setting", but on the other hand, the current
> behavior of x-select-enable-primary is almost useless, so ...]

BTW (since you mentioned selections from the current Emacs process) - Is there
no interest in an ability to copy/paste between Emacs sessions without
necessarily affecting the kill ring?

I personally want to use the kill ring even for mouse selection, but it seems to
me that some people might want, between Emacs sessions, the same ability that
they have within a session: be able to select and paste text using the mouse,
without adding the selection to the kill ring.

Or is that already possible with Emacs on X?  I asked that question in bug #6956
but never got an answer.

IIUC, you can mouse-select in Emacs and paste to another app, and vice versa,
all without affecting the kill ring (only the primary is used by default, IIUC).
Why shouldn't you be able to treat a separate Emacs session as one of those
other apps?





  parent reply	other threads:[~2010-10-15 16:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11  5:15 Custom themes Chong Yidong
2010-10-11  7:48 ` Deniz Dogan
2010-10-11 15:34   ` Chong Yidong
2010-10-11 16:09 ` Lars Magne Ingebrigtsen
2010-10-11 17:38   ` Chong Yidong
2010-10-11 21:04 ` Eric Lilja
2010-10-12 14:08   ` Joel James Adamson
2010-10-12 20:25 ` Chong Yidong
2010-10-12 23:40   ` Eric Lilja
2010-10-13  0:04   ` Christoph
2010-10-13  2:15     ` Chong Yidong
2010-10-13 20:06   ` David De La Harpe Golden
2010-10-14  4:23     ` Chong Yidong
2010-10-14  4:58       ` Miles Bader
2010-10-14 13:18       ` users and selection changes [was: Custom themes] Drew Adams
2010-10-14 18:35         ` Eli Zaretskii
2010-10-14 20:51           ` Drew Adams
2010-10-14 21:54             ` Eli Zaretskii
2010-10-14 22:09               ` Drew Adams
2010-10-15  9:30                 ` Eli Zaretskii
2010-10-15  9:34                   ` users and selection changes Lars Magne Ingebrigtsen
2010-10-15  9:45                     ` Eli Zaretskii
2010-10-15 10:11                       ` Lars Magne Ingebrigtsen
2010-10-15 10:16                         ` Eli Zaretskii
2010-10-15  9:48                     ` Miles Bader
2010-10-15 10:18                       ` Lars Magne Ingebrigtsen
2010-10-15 13:47                         ` Miles Bader
2010-10-15 14:25                           ` Lars Magne Ingebrigtsen
2010-10-15 15:10                             ` Eli Zaretskii
2010-10-22 10:05                         ` Lars Magne Ingebrigtsen
2010-10-15 16:30                       ` Drew Adams [this message]
2010-10-15 19:08                       ` Stefan Monnier
2010-10-15 20:46                       ` Chong Yidong
2010-10-13  0:26 ` Custom themes Stefan Monnier
2010-10-13  2:14   ` Chong Yidong
2010-10-13 10:20     ` Juanma Barranquero
2010-10-13 15:06       ` CHENG Gao
2010-10-13 16:05       ` Chong Yidong
2010-10-14 15:53         ` Chong Yidong
2010-10-14 16:47           ` Juanma Barranquero
2010-10-16 18:33             ` Chong Yidong

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=EA5EB7AC0B2B4651BC1B44310929EEC9@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@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 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.