From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Selection changes in revno 100822 Date: Mon, 16 Aug 2010 02:36:42 +0900 Message-ID: <87r5hzrd5h.fsf@uwakimon.sk.tsukuba.ac.jp> References: <834oeyv3ww.fsf@gnu.org> <87mxsqyp98.fsf@stupidchicken.com> <83zkwptyij.fsf@gnu.org> <4C66660D.3090603@swipnet.se> <83sk2htp82.fsf@gnu.org> <4C66A8C5.4040203@harpegolden.net> <83hbixte8c.fsf@gnu.org> <4C66D081.908@harpegolden.net> <838w48u9fg.fsf@gnu.org> <8739ugrniw.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281906720 18273 80.91.229.12 (15 Aug 2010 21:12:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 15 Aug 2010 21:12:00 +0000 (UTC) Cc: david@harpegolden.net, cyd@stupidchicken.com, jan.h.d@swipnet.se, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 15 23:11:58 2010 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.69) (envelope-from ) id 1OkkUg-0002Sr-Io for ged-emacs-devel@m.gmane.org; Sun, 15 Aug 2010 23:11:56 +0200 Original-Received: from localhost ([127.0.0.1]:51087 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OkkUa-0007h5-3Q for ged-emacs-devel@m.gmane.org; Sun, 15 Aug 2010 17:11:44 -0400 Original-Received: from [140.186.70.92] (port=56543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Okjq6-000352-Ix for emacs-devel@gnu.org; Sun, 15 Aug 2010 16:29:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OkhAm-0001Bs-Pj for emacs-devel@gnu.org; Sun, 15 Aug 2010 13:39:05 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:33760) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OkhAk-0001Ab-6D; Sun, 15 Aug 2010 13:39:02 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 25A367FFA; Mon, 16 Aug 2010 02:38:58 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id C702B11F034; Mon, 16 Aug 2010 02:36:42 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:128757 Archived-At: Eli Zaretskii writes: > > > I wasn't talking about clipboard pasting, I was talking about > > > pasting from the primary selection. > > AFAIK you can't copy/paste from the Windows primary selection > > (unless it's a situation where moving doesn't make sense, such as > > between disks in Explorer), although you can drag it somewhere > > else. > You are confused (not that it's hard to become one in this thread). > I was talking about X here, not about Windows. Perhaps I was not being sufficiently explicit. There *is* an analogue to the primary selection on Windows, but it is (at least) as limited as the primary selection on X, although in a different way. (Although it would seem from discussion in this thread that Windows programmers don't think of it that way.) Because of this, it makes sense to look for a common interface that is natural to Windows users, and is not unnatural (because not commonly used for something else) to X11 users. That something is drag and drop, which happens to work on Mac as it does on Windows AFAIK. It doesn't hurt if mouse-2 is enabled as paste-the-primary on X11. In fact, I would really like that combination. Drag to move and mouse-2 to copy, without polluting the kill ring, would be a killer feature IMHO. Sometimes I want to move once, sometimes I want to copy one or more times. This gives me both. > You are confused. The "as far as Windows use patterns" part is > about my past disagreements with David regarding how to map 3 > selection types on X to a single clipboard on Windows. Sure, but the reason you give is wrong. There is a clipboard, and there is the selection, which *can* but does not *always* interact with the clipboard. These can be distinguished by the user on Windows as well as in X11. If you drag a file in Explorer, it does not end up on the clipboard. > The "give me some credit" part is about the distinction between > these 3 selection types on X: somehow, David thought I didn't > understand that, and that I needed a lecture about it. Well, you may understand it, but you do not write in a way that would allow someone familiar with X conventions and terminology to guess that you do. If you're going to consistently use terms that have a specific definition in X ("selection", "primary") in a different way, then you have a choice: be misunderstood, or repeatedly provide your definitions. Asking people who know X well to forget all the definitions they know *when talking about X* is not an option. The human mind is flexible enough to use X definitions in the X world and Emacs definitions in the Emacs world, but it is not going to successfully adapt to loss of the familiar vocabulary that is *needed* for this kind of discussion, just because you don't feel like learning to speak intelligibly to an audience of Xperts. > You are talking about drag'n'drop, which does have a direct analog > on X. I don't think drag'n'drop, in its current shape, could or > should be regarded as a kind of ``primary selection'' on Windows, > that would just make this discussion more confusing. Drag and drop is not a primary selection, it is a way of manipulating the primary selection (or its Windows analog). The primary selection is a set of objects contained in an area on the screen, normally indicated by highlighting, which in practice can manipulated ephemerally with the mouse, or which can be more durably handled by placing them (as a group) on the clipboard. > > Some experienced X users use the "drag to select, middle button > > to paste" and "drag to select, drag again to move" gestures a lot > > (when available, drag to move isn't standard part of toolkits > > AFAIK, although some apps implement it). If available, Windows > > users might like to use it too. > But it isn't available on Windows, not without overwriting the > clipboard with selected text. Drag and drop *is* available, and I explained elsewhere a reasonable compromise semantics (copy between apps, move within a document, context-dependent for separate buffers within Emacs) which gives Windows most of what I would want. X11 can have full mouse-based functionality by also binding mouse-2 to paste-primary-selection. Of course the drop targets need to accept what Emacs has to offer, but that's not Emacs's problem, I suspect most drop targets that should accept dropped text do accept dropped text, and the user can always fall back on C-c/C-v to work via the clipboard. > The only issue that still needs to be discussed (IMO) is which > gestures should cause PRIMARY to be set with the selected text and > which shouldn't. Hey, Eli, you're the one who said, "let's talk about X first". Well, in X, that needs zero discussion. In X, PRIMARY *is* the set of objects in the selected (highlighted) area of the screen (which might be text or a widget or an icon, or sets of the above). I don't know of any programs where this is not true. And the program should not do something different unless explicitly asked by the user. It would be insane on X if PRIMARY was not set (by default) when something is selected. If by "selected" you mean the Emacs region, that does need discussion, but you've got the wrong idea. It's not "which gestures," it's "which face." I would say that if you highlight the region with the same face used to highlight an area selected by the mouse, then Emacs should own PRIMARY and associate the region with it. If the region is not highlighted, or highlighted with a distinctive face different from the one used to indicate the X selection, then Emacs should not own primary for that region. Of course you can then say, "which gestures should be associated with which face". On that, IMO the region should be either highlighted or not, and when it is highlighted, it should be highlighted with the "X selection face", and it should be associated with the PRIMARY selection. Regardless of the gesture(s) used to select the region. IIUC, that is Miles's position, too. N.B. 15 years of experience with that policy in XEmacs say it works well, including the last ten years when selection by mouse, selection by C-SPC, and selection by shifted motion have all been available (by default).