From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: clipboard/selection: customization vs. rebinding Date: Tue, 28 Jun 2011 23:19:36 -0400 Message-ID: References: <4E07A0DB.7030503@harpegolden.net> <87d3hz5kp7.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309317597 24421 80.91.229.12 (29 Jun 2011 03:19:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2011 03:19:57 +0000 (UTC) Cc: Emacs developers , David De La Harpe Golden To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 29 05:19:53 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QblJg-0007ie-UC for ged-emacs-devel@m.gmane.org; Wed, 29 Jun 2011 05:19:53 +0200 Original-Received: from localhost ([::1]:40704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblJg-0000mr-6w for ged-emacs-devel@m.gmane.org; Tue, 28 Jun 2011 23:19:52 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:60815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblJT-0000mb-0Q for emacs-devel@gnu.org; Tue, 28 Jun 2011 23:19:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QblJR-0007od-Tx for emacs-devel@gnu.org; Tue, 28 Jun 2011 23:19:38 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:63937 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QblJR-0007oZ-O7 for emacs-devel@gnu.org; Tue, 28 Jun 2011 23:19:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EABmZCk5MCqDH/2dsb2JhbABSp014iHjAI4YwBJ4xhCs X-IronPort-AV: E=Sophos;i="4.65,441,1304308800"; d="scan'208";a="117459014" Original-Received: from 76-10-160-199.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.199]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 28 Jun 2011 23:19:36 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 7378C59057; Tue, 28 Jun 2011 23:19:36 -0400 (EDT) In-Reply-To: <87d3hz5kp7.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 27 Jun 2011 11:59:48 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141150 Archived-At: > It's a tough decision. It's true that mouse-yank-at-click has fringe > bindings, so anyone who wants the old behavior would need to rebind > those too, which is a nuisance. Shouldn't we do something like the patch below? > However, if we introduce a boolean to control mouse-yank-at-click, that > makes it harder for users to have both mouse yank behaviors available > (by binding mouse-yank-at-click and mouse-yank-primary to different > keys)---unless we introduce yet another command that unconditionally > yanks from the kill ring, which I think is not worth the complication. It doesn't seem that terrible, but I also don't think it matters that much either way (i.e. I think the main problem with the new behavior is that C-y now never inserts the primary). Stefan === modified file 'lisp/mouse.el' --- lisp/mouse.el 2011-06-01 16:10:20 +0000 +++ lisp/mouse.el 2011-06-29 03:17:30 +0000 @@ -2092,16 +2092,16 @@ ;; (global-set-key [triple-mouse-1] 'mouse-set-point) ;; Clicking on the fringes causes hscrolling: -(global-set-key [left-fringe mouse-1] 'mouse-set-point) -(global-set-key [right-fringe mouse-1] 'mouse-set-point) +(global-set-key [left-fringe mouse-1] [mouse-1]) +(global-set-key [right-fringe mouse-1] [mouse-1]) (global-set-key [mouse-2] 'mouse-yank-primary) ;; Allow yanking also when the corresponding cursor is "in the fringe". -(global-set-key [right-fringe mouse-2] 'mouse-yank-at-click) -(global-set-key [left-fringe mouse-2] 'mouse-yank-at-click) +(global-set-key [right-fringe mouse-2] [mouse-2]) +(global-set-key [left-fringe mouse-2] [mouse-2]) (global-set-key [mouse-3] 'mouse-save-then-kill) -(global-set-key [right-fringe mouse-3] 'mouse-save-then-kill) -(global-set-key [left-fringe mouse-3] 'mouse-save-then-kill) +(global-set-key [right-fringe mouse-3] [mouse-3]) +(global-set-key [left-fringe mouse-3] [mouse-3]) ;; By binding these to down-going events, we let the user use the up-going ;; event to make the selection, saving a click.