From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tobias Gerdin Newsgroups: gmane.emacs.devel Subject: Keybinding for finding definition by mouse Date: Sun, 8 Jul 2018 22:06:18 +0200 Message-ID: <76face16-e29e-e945-674f-79b8a2f2e498@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1531080268 30912 195.159.176.226 (8 Jul 2018 20:04:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2018 20:04:28 +0000 (UTC) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 08 22:04:24 2018 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 1fcFux-0007ss-WE for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2018 22:04:24 +0200 Original-Received: from localhost ([::1]:38090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcFx3-0001Nr-7Z for ged-emacs-devel@m.gmane.org; Sun, 08 Jul 2018 16:06:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fcFwv-0001Nh-Qo for emacs-devel@gnu.org; Sun, 08 Jul 2018 16:06:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fcFws-00021S-GO for emacs-devel@gnu.org; Sun, 08 Jul 2018 16:06:25 -0400 Original-Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:32935) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fcFws-00020O-8A for emacs-devel@gnu.org; Sun, 08 Jul 2018 16:06:22 -0400 Original-Received: by mail-lj1-x234.google.com with SMTP id t21-v6so12551505lji.0 for ; Sun, 08 Jul 2018 13:06:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=Ae55X8mcWPFwbbgQJCDrYAD3ktYwd7O8fzgrfbPV1po=; b=hArvf04/34lWoet4dKf23DYp9/fxSQiQmFTD7SNaBkJnNeoLBtGHbjFNAw/HjXyp3T Zfej3PlMUxfr4ApPyUxafcFu4LtoAWubClLqWJoPyjmdKA67aHUY9F2U05fRhFdHiMmi Oo//5kOBtC8v1QLs3XtZpdUp2cPKSGDyNRZmd2fmrwFsFzJagTya7P/GDo/afEvCvVZH z69FvJcBDBqm6sW2CK1G2HT4OmKwDWNOM39KRGOH7V0AIfHjMroZjkf9oemilRaIa3jX 2Elkuvw1hGp2VwLj86cIoMgVHMrD+lF0zBTUZbR+49HfYZxq0Kq3juRbyXUHroUDpveM uvpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=Ae55X8mcWPFwbbgQJCDrYAD3ktYwd7O8fzgrfbPV1po=; b=FuC70mAlzukdlSySeyqpqvjDNnQRUeYe2OlECdKehRhhM8DdlKkezDyA5/6oGRvVkB KyarypFLvlppJuyxsXLx1t1syTwByEz5gaJb3P0EP6Qp/YGya5If/7+a5ebxBuL63Ac6 bNNG2kubIXCnTCcnhpLhtTuGIq+9US/BRMj1t6TjtUD3eBLp0ziSfvs6/51JU9quAZ0R DRHRBbS58XKwgQiVUHhV7W0fxwB7lYcmIUGqUu93T35VDo8Q6JGhS9POBiMtWvmKNoc1 O3VNWYzJ/tNxW361qk4IP4HHiNCbRvug8NupxwYt2zgiIB6Ej0WyvuXx26Ybozhv3Loc QR6w== X-Gm-Message-State: APt69E3qhYMMHG/N4r+kgq4+O73qA3TFzPjd9Kba6RtuUtsBB9QZnkJH x0IU/8b4gycjaQxrdq3a97Ve0g67 X-Google-Smtp-Source: AAOMgpfZ7yD+BM0Z0D6e3b89nXNAfCk7ltjWDEL/sixQUh+rnqORxXNcnvb1nYGbfxkZ5FYnPVVH1w== X-Received: by 2002:a2e:534e:: with SMTP id t14-v6mr1465507ljd.26.1531080380388; Sun, 08 Jul 2018 13:06:20 -0700 (PDT) Original-Received: from Tobias-MBP.lan (h83-209-121-192.cust.se.alltele.net. [83.209.121.192]) by smtp.gmail.com with ESMTPSA id x129-v6sm1385566lff.19.2018.07.08.13.06.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Jul 2018 13:06:19 -0700 (PDT) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::234 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:227137 Archived-At: Hello, A function for jumping to a definition by clicking on an identifier was recently added to master.[1] For mouse users like myself this invoking this is probably the second mouse common use of the mouse (after text selection) so I propose we add a default binding for it in the global map. So which one? All other editors/IDEs I am familiar with (Eclipse, IntelliJ, VS Code) has this bound to . Not that Emacs has to follow this convention, but since it's a convenient choice this would be my preferred binding. Because this is Emacs it as obviously already used (for 'mouse-buffer-menu'). The meta modifier mouse events are all used for secondary selection (very useful) and I vaguely recall that shift modified mouse events (S-mouse-..) are reserved for the user (in the same spirit as the C-c), also makes sense.[2] is bound to 'face-menu'. It's useful on occasions (mostly in enriched-mode I presume?) but since mouse-2 is typically bound to the mouse wheel button on modern mice it is very uncomfortable for something used regularly hence not a good choice I think. My proposal: is bound to a mode-specific context menu ("major mode menu"). Because this same menu is also available by clicking mouse-1 on the mode name in the modeline (and it's also in the frame/application menu) I propose we move 'mouse-buffer-menu' to C-mouse-3 in the interest of freeing up C-mouse-1 for 'xref-find-definitions-at-mouse'. would be another, more conservative option because the all of the appears to be unbound. Wishful thinking would be to also have 'xref-pop-marker-stack' bound to some mouse event (ideally C-mouse-3) to enable keyboard-free code browsing when one so feel inclined, but I may be greedy here and would settle for keeping that one to my private keymap for now. What do you think? I am not subscribed to the list so I would be grateful if I would be CC:ed any replies. -- Regards, Tobias Gerdin [1]: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=455a236d415d3ca9a25564cd3f295f5e5e0bb7b4 [2]: Even so, ffap.el binds the similar functionality 'ffap-at-mouse' to through the command 'ffap-bindings'. So one option would be to introduce a "dwim-at-mouse" unifying xref-find-definitions-at-mouse and ffap-at-mouse and bind it to that.