[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Selection changes

From: David De La Harpe Golden
Subject: Re: Selection changes
Date: Sat, 17 Jul 2010 03:28:34 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100620 Icedove/3.0.5

On 17/07/10 02:02, Miles Bader wrote:
David De La Harpe Golden<address@hidden>  writes:
N.B. that definitely needs to be _off_ for bringing emacs in line with
other apps.  If it's on, it means C-y inserts primary and pushes primary
onto the kill ring.

Why is that bad?

Shrug. It's not what other apps do, and what's more, emacs behaviour when both the x-select-enables are turned on at once is particularly strange (thanks mostly to x-cut-buffer-or-selection-value's desperate attempts to please)

I'm not arguing based on principle, but rather because I've been using
it that way (with x-select-enable-primary set to t)
> for many years with many other standard apps of both sorts,
> and it seems to work almost perfectly this way.

Perhaps for you - but you, like myself, know what's going on under the hood. To someone who has only used Mac/Windows/fd.o-x11, it's plain bizarre.

[Anyway, this is only about what the default should be, you can still turn on the option if you like it.]

In particular:

   * selecting some text in a cut/past style app, and invoking "copy" in
     that app, should allow the copied text to be pasted in emacs with

Remember that primary is /still set/ by "cut/paste" style apps that set clipboard on cut/paste, they still set primary on selecting text.

with both x-select-enables on:

C-y in emacs gives you clipboard for a while, until you select something else in emacs, which causes emacs to set and prefer primary, then it gives you primary for a bit when you C-y (or the kill ring head), then you go "wtf?" and select then C-c again in $app, and you get clipboard for a bit when you C-y in emacs, until you select more text, then C-y gives you primary, but then you C-v in $app and you still get clipboard, but C-y in emacs still gives you primary...

i.e. emacs C-y has magically morphed (as far as the end user is concerned) from acting like $app C-v to acting like $app mouse-2.

And then some helpful emacser turns around and tells a newbie "oh just turn on cua mode"! but what cua mode does is make emacs C-v act like emacs C-y. Since emacs C-y doesn't act like non-emacs C-v, turning on cua mode still doesn't make emacs C-v act like non-emacs C-v.

*** So please, turn on one or the other of x-select-enable-primary or
x-select-enable-clipboard by default, not both at once.

   * selecting some text in a selection-using app (e.g. xterm) should
     allow the selected text to be pasted in emacs with C-y.

With x-select-enable-primary off but with the mouse-2 rebound, it can still be inserted with mouse-2 as in other apps.

xterm itself, while IIRC still maintained, is not typically the terminal
emulator that gets launched when a user clicks "terminal" anymore:
e.g. in the terminal emulator I use (xfce4-terminal), out of box, Shift-Ctrl-C will copy to clipboard and Shift-Ctrl-V will paste from clipboard. (Same shortcuts work out-of-box in the KDE terminal, konsole).

reply via email to

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