From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David De La Harpe Golden Newsgroups: gmane.emacs.devel Subject: Re: select-active-regions Date: Sat, 18 Jul 2009 14:41:10 +0100 Message-ID: <4A61D0F6.5040901@harpegolden.net> References: <83zlb2p79y.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1247924547 15079 80.91.229.12 (18 Jul 2009 13:42:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Jul 2009 13:42:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 18 15:42:20 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MSAB9-0005v8-8q for ged-emacs-devel@m.gmane.org; Sat, 18 Jul 2009 15:42:19 +0200 Original-Received: from localhost ([127.0.0.1]:53224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSAB8-0007bO-Ol for ged-emacs-devel@m.gmane.org; Sat, 18 Jul 2009 09:42:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MSAAL-0007J2-P2 for emacs-devel@gnu.org; Sat, 18 Jul 2009 09:41:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MSAAH-0007H5-BL for emacs-devel@gnu.org; Sat, 18 Jul 2009 09:41:29 -0400 Original-Received: from [199.232.76.173] (port=36173 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MSAAG-0007Gz-Pq for emacs-devel@gnu.org; Sat, 18 Jul 2009 09:41:24 -0400 Original-Received: from harpegolden.net ([65.99.215.13]:50634) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MSAA9-0006wu-NG; Sat, 18 Jul 2009 09:41:18 -0400 Original-Received: from [87.198.47.126] (87-198-47-126.ptr.magnet.ie [87.198.47.126]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "David De La Harpe Golden", Issuer "David De La Harpe Golden Personal CA rev 3" (verified OK)) by harpegolden.net (Postfix) with ESMTP id 7DD318274; Sat, 18 Jul 2009 14:41:12 +0100 (IST) User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) In-Reply-To: <83zlb2p79y.fsf@gnu.org> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:112675 Archived-At: 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.