emacs-devel
[Top][All Lists]
Advanced

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

Re: select-active-regions


From: David De La Harpe Golden
Subject: Re: select-active-regions
Date: Sat, 18 Jul 2009 14:41:10 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701)

Eli Zaretskii wrote:


please do not forget that the MS-DOS port of Emacs also supports the
mouse and the clipboard.  These changes broke it because
x-selection-owner-p was not defined.


Apologies. Chong Yidong had already had to point out to me that it broke w32, but w32 was already internally faking a primary: In general, enabling select-active-regions at all on platforms that don't have a true primary selection may not make an immense amount of sense, but if they're internally emulating as w32 was it does make some sense.

I see your fix to lisp/term/pc-win.el , but it is not doing the right thing as far as I can see (no way for me to test. Well I suppose I could install FreeDOS, but I'm not aware of a free w16 layer for it). If w16 has no OS-level concept of primary (I very much doubt it does, though I can't say I'm familiar with it), then:

(x-set-selection 'PRIMARY value)
;should just stash value somewhere, w32 was putting it as a property
; on a symbol x-selections.  Aside: w32 could maybe do something
; sensible for (x-set-selection 'CLIPBOARD value)

(x-get-selection 'PRIMARY)
; should just return the stashed value.

(x-selection-owner-p 'PRIMARY)
;should just return true once value has been set.

Your pc-win.el x-selection-owner-p code would be more appropriate for 'CLIPBOARD code paths, I think, since apparently w16 has a clipboard.


By the way, I don't think x-selection-owner-p, as defined on
w32-fns.el, is correct: If I set select-active-regions non-nil on
Windows, the active region does not get put into the clipboard.  Isn't
that the intent of this feature?

No, definitely not! It was intended to be put on _primary_, which is distinct from clipboard and doesn't have an analogue on windows (well, I speculate that it might be now possible to partially fake it with w32 accessibility APIs).

It would _possible_ to offer a customization option to say where to put it, one of the early rejected iterations of the patchset in fact did so IIRC, but that was not the original idea of select-active-regions and would very probably confuse most people - would be an unusual and nonstandard use of a clipboard, whereas mirroring the active region in primary is a pretty normal thing to want to do.









reply via email to

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