From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.devel Subject: Re: Changing default mouse bindings Date: Wed, 15 Nov 2017 08:11:08 +0900 Message-ID: <86y3n83183.fsf@misasa.okayama-u.ac.jp> References: <0ad9af94-11cc-4dae-841f-f2918342d1bf@default> <7f5a496c-1ea7-4f0c-a2f5-4e5307d7ee82@default> <87fu9heq03.fsf_-_@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1510701123 6918 195.159.176.226 (14 Nov 2017 23:12:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2017 23:12:03 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (windows-nt) Cc: johnw@gnu.org, emacs-devel@gnu.org, Alex , monnier@iro.umontreal.ca, eliz@gnu.org, drew.adams@oracle.com To: charles@aurox.ch (Charles A. Roelli) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 15 00:11:53 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEkMv-000130-Q7 for ged-emacs-devel@m.gmane.org; Wed, 15 Nov 2017 00:11:49 +0100 Original-Received: from localhost ([::1]:33944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEkN3-0003Zt-5z for ged-emacs-devel@m.gmane.org; Tue, 14 Nov 2017 18:11:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEkMU-0003Zd-Nm for emacs-devel@gnu.org; Tue, 14 Nov 2017 18:11:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEkMP-000304-P6 for emacs-devel@gnu.org; Tue, 14 Nov 2017 18:11:22 -0500 Original-Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:46797) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eEkMP-0002zF-IL; Tue, 14 Nov 2017 18:11:17 -0500 Original-Received: by mail-pf0-x22a.google.com with SMTP id i15so5233558pfa.3; Tue, 14 Nov 2017 15:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=lo1+8vKeVqwY5ztGO8CyzJpnnSRSaJAnfSa4iT/VCfI=; b=jjYS8X06afP8iNGkF2yj89m6V9ditt188C3VpgVrpZJdfRPrPgZnyt3xVI9g4E8UsP Bd7Q24qgFDFZB7EknAUS69+ueVYRFJnzy5D9gNLdSCJx89Z56OXBbgab+1CEy62b1PK5 EnWFDdTdAU7gvAa5YivY8Hytuj7POARvY1hD1VIuVWsVIb2Qg352+Ogq/NOXrAUmdHRK jJ8wfSnoq4tbuebAPqMfVUxtVcCVsphqfDK3GHOtemxf4borMA76hcO6tkRUqedZY8Du QhA1bBvpsBCocQEENXamFHP6+pb18heicYQkYyxtFyRM0uvxqGsRw0HMZ5TplaEiVMPk fOEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=lo1+8vKeVqwY5ztGO8CyzJpnnSRSaJAnfSa4iT/VCfI=; b=hbeyRBNQUTGAUNWESSGcYVXTe43dfwoyDnssmXXy07RrZgrrcO71/+QXvsv0a1CnJ+ S1+2kI6MV+37q8Fg77PrWM2pNePtvUaoFPNLy1AH6Nt1+zYfJw/0gZJQeHc2JQpbVcCj HncnvfouQ0bD7Nyh8xecqKrBmBlBMuY2EIauzHD3eDW9Zjdip1Vgwp/KHUASJzIW8vjW Qra7Yj7XZRGG45D8h6+15ZDwerjd5jIWeuZvsh0Wa5kkKVfjOirW1B9uUuvn9TcvsH/L 6ynZ4fdFO7lTvCEZi6ngltZ/bJBsbfvfrL7N781dgRCHGuBBLN1b9anOYrUYSkQpZLGz 6hUw== X-Gm-Message-State: AJaThX44foRUd2GMDaaeA5jo1a+NqnWD3SidiIOmzmY6dbyT274dlJDg zLVRlfo/RIbVqei6Eyk3VdETj7J5 X-Google-Smtp-Source: AGs4zMa+iylbF1BwyZuG9S3porGVr+JxghUHuDAipYW9cRkaxO1ePjxzwb2uKn3A+GhwvblUClCVbw== X-Received: by 10.84.128.72 with SMTP id 66mr13674473pla.250.1510701076358; Tue, 14 Nov 2017 15:11:16 -0800 (PST) Original-Received: from thinkless2016 (vesta.misasa.okayama-u.ac.jp. [150.46.48.154]) by smtp.gmail.com with ESMTPSA id n22sm37266743pfa.161.2017.11.14.15.11.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Nov 2017 15:11:15 -0800 (PST) X-Google-Original-From: Tak Kunihiro In-Reply-To: (Charles A. Roelli's message of "Tue, 14 Nov 2017 21:26:02 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:220200 Archived-At: >> Is it completely out of the question to just bind right-click >> directly to this context menu by default instead of using double >> clicks or long clicks? If so, will it ever be considered? It would >> be a shame if Emacs is never able to shed some of its old baggage. > > I hope it would be considered. Originally I thought it would be best > to work around the current bindings (via either the long press or > double click of mouse-3), but if we can instead provide multiple > functionalities with mouse-3 by differentiating between simple clicks > and drags as Yuri suggested, that could be an even better solution. My proposal is before changing the default binding, to have minor mode such like `poplife-mode' that provides the mouse-3 binding with a series of context menu. I think context menu itself is as important as how to trigger. (define-minor-mode poplife-mode "A global minor-mode to show context menu by right click." :init-value nil :global t :keymap (let ((map (make-sparse-keymap)) (context-menu `(menu-item "Context menu" poplife-context-menu :filter ,(lambda (_) (poplife-context-menu (aref (this-command-keys) 0)))))) (define-key map [mouse-3] context-menu) (define-key map [drag-mouse-3] context-menu) (define-key map [C-down-mouse-1] 'ignore) (define-key map [C-mouse-1] context-menu) (define-key map [C-double-mouse-1] context-menu) (define-key map [C-triple-mouse-1] context-menu) (define-key map [C-drag-mouse-1] context-menu) map))