From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: ffap bindings suggestion Date: Thu, 09 Feb 2006 19:33:48 +0200 Organization: JURTA Message-ID: <87oe1gy4fe.fsf@jurta.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139516963 8083 80.91.229.2 (9 Feb 2006 20:29:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2006 20:29:23 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 21:29:21 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F7IPW-0004qF-N6 for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2006 21:29:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7IPW-00061Z-0L for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2006 15:29:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F7Frp-0000iC-05 for emacs-devel@gnu.org; Thu, 09 Feb 2006 12:46:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F7Frn-0000gw-7h for emacs-devel@gnu.org; Thu, 09 Feb 2006 12:46:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F7Frm-0000gp-ER for emacs-devel@gnu.org; Thu, 09 Feb 2006 12:46:03 -0500 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F7FvM-0001z4-L2 for emacs-devel@gnu.org; Thu, 09 Feb 2006 12:49:45 -0500 Original-Received: from mail.neti.ee (80-235-37-98-dsl.mus.estpak.ee [80.235.37.98]) by Relayhost1.neti.ee (Postfix) with ESMTP id 6726860F9; Thu, 9 Feb 2006 19:46:00 +0200 (EET) Original-To: "Drew Adams" In-Reply-To: (Drew Adams's message of "Wed, 8 Feb 2006 10:46:36 -0800") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:50247 Archived-At: > 1. Library ffap.el makes these bindings, among others: > > (global-set-key [S-mouse-3] 'ffap-at-mouse) > (global-set-key [C-S-mouse-3] 'ffap-menu) > > These keys are undefined in vanilla Emacs, so this is not bothersome. > However, it is common to use mouse-3 for pop-up menus, and alternative, > related menus might, in some contexts, be appropriate for mouse-3 plus > modifiers. For example, a library might want to use mouse-3 for one menu, > S-mouse-3 for a related menu, and C-S-mouse-3 for another related menu. > > Suggestion: Change the ffap bindings to [S-mouse-2] and [C-S-mouse-2]. I agree that it is common to use mouse-3 for pop-up menus, so I think the old keybinding [C-S-mouse-3] for ffap-menu is more natural than changing it to [C-S-mouse-2] which is more suitable to follow a link. > These keys are also undefined in vanilla Emacs. [S-mouse-2] is akin to > mouse-2 when the latter follows a link (which is essentially what > `ffap-at-mouse' does), so it feels natural to use. With recent changes in many modes to use mouse-1 instead of mouse-2 to follow a link, perhaps ffap should use a modifier with mouse-1, e.g. [C-S-mouse-1]. > I use the mouse-2 bindings suggested here, and I don't mind continuing to > customize my setup to do so. I just wonder if they might also be better as > the default bindings. If there is no available modifier for mouse-1, then I think better default keybindings are: (global-set-key [C-S-mouse-3] 'ffap-menu) (global-set-key [C-S-mouse-2] 'ffap-at-mouse) or (global-set-key [C-S-mouse-1] 'ffap-at-mouse) > 2. Should variable `ffap-bindings' be a defcustom, so that users can more > easily customize the bindings? In that case, the library could be modified > slightly to not require users to put `(ffap-bindings)' in their .emacs: > simply loading the library would create the (default or customized) > bindings. > > How do other libraries deal with multiple non-standard bindings? Many libraries provide a variable which during loading the library tells it to bind its non-standard bindings if this variable it non-nil. -- Juri Linkov http://www.jurta.org/emacs/