From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: RE: ctl-x-map key binding conventions for new major/minor modes Date: Sat, 13 May 2017 14:33:45 +0900 (JST) Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1494653679 19739 195.159.176.226 (13 May 2017 05:34:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 May 2017 05:34:39 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Emacs developers , Tino Calancha To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 13 07:34:32 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 1d9PhI-0004vB-3h for ged-emacs-devel@m.gmane.org; Sat, 13 May 2017 07:34:32 +0200 Original-Received: from localhost ([::1]:56359 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9PhJ-0002oF-Tx for ged-emacs-devel@m.gmane.org; Sat, 13 May 2017 01:34:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d9Pgg-0002mv-Dz for emacs-devel@gnu.org; Sat, 13 May 2017 01:33:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d9Pgd-0004AT-9l for emacs-devel@gnu.org; Sat, 13 May 2017 01:33:54 -0400 Original-Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:35280) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d9Pgd-00049c-47 for emacs-devel@gnu.org; Sat, 13 May 2017 01:33:51 -0400 Original-Received: by mail-pg0-x243.google.com with SMTP id i63so9940723pgd.2 for ; Fri, 12 May 2017 22:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=DLlhV8jNQxIVf+C1ngmySWxTo9rDgYKmg9GpawNF/iI=; b=gOIFWLIjCjKPMsZMVhFmC3YXVSR9tB1d4nNVpl4vz1oQFzZQ78z+fiCiRJynihGcu3 YSdu0KV2G5WRba30NIqFrL/BTLj24LZr7dOsTLDPK0Gu05VtNjMXvBImDoW3M4NiX9Bb f6YV46+uErmIaDWWvhJNDRaM3u2UOukBB6D8JkU1+eT4WzZohlEJ6F9dmjt+w6kwI1Cp CsyjZYrp+y+/Z7JJL4jWkfHmL9XIvV1h1d8Kkuo/EeAXB0MEQStAyFEaggCSIHiho5xs 4+AnZn8CsvDN4TitnDLTCelgObs7Rk4sApSy8ZMzG4ayNObYNCABOr4N/CObt3/8+xdj hCuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=DLlhV8jNQxIVf+C1ngmySWxTo9rDgYKmg9GpawNF/iI=; b=mL125EulsNvIV6m1RZQ453vKmQ0X7qO0SvEjP8hIyXBE/Xa9lWvrLw920j8Ym2MMpV xoB5DK5IQxwuVkcAIfmppSwPG+7uH6EmXmc7UsYMWGHpOZc/CofBKTe3T/tRsFvEwQId ho3InapUa2W7NiymU0JXejfOsJqW6wz+LA3sPSWmG1P6P/lgu61ct+R5kR5TzV6/5AsP aXMdtCJS3cRmxkJq1yWK2cd414UJPvGeGS2k9F9z4E31bQXyG+MlXd4MmjasSUwSm2Ov UFZ2BJz9fmgua4rqVKzaQxJMuAdbtjt9Gd68J7YSTHJpg7uO0DDjxXYQy6ILm3NRmmVL pHbA== X-Gm-Message-State: AODbwcCHuYWLiCVKkhlJFPeDpcCLmsIMO++UzUgwL+ZRi/uFJ38gjkP9 ncv2VxzTc2R0hQ== X-Received: by 10.99.8.2 with SMTP id 2mr7981528pgi.18.1494653630207; Fri, 12 May 2017 22:33:50 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id d86sm9421404pfj.75.2017.05.12.22.33.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 22:33:49 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 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:214806 Archived-At: On Fri, 12 May 2017, Drew Adams wrote: >> (info "(elisp) Key Binding Conventions") >> Do we need a recommendation in this node about bindings with >> prefix 'C-x'? There is no guidance in the node above about >> this topic. Just loading a new mode shouldn't shadow some >> previous C-x bindings, right? >> >> For instance, >> * timeclock.el suggests some C-x bindings in the comentary, that is, >> it doesn't define these bindings by default. >> * dired-x.el has the user option `dired-bind-jump' to control if >> `dired-jump' must be bound or not to 'C-x C-j'. >> * find-func.el has the autoloaded function `find-function-setup-keys', >> which binds some commands into `ctl-x-map'. > > Are you asking whether code that is distributed with Emacs > should bind keys with prefix `C-x'? That's usually discussed > and decided case by case, e.g. on this list. > > Are you asking whether we should make particular recommendations > in this regard for 3rd-party code? If so, I think not. I am asking for both. For example, magit.el suggests the binding 'C-x g' for `magit-status'. It doesn't establish the binding automatically, though. Imagine one user sets that binding in her .emacs file. Now she loads a lib `foo.el' which automatically sets a global binding 'C-x g' to `foo-whatever'. In the examples above (timeclock, dired-x, etc) the user can easily control such key binding collisions. It's something good for people loading many libs. We might add a recommendation in that info node about 'C-x ...' as we do with 'C-c ...'. > Loading a 3rd-party library is optional. If a library binds keys > just by loading it then that should at least be made clear in the > library doc/commentary. A user can always override any bindings > that might be made by a library, but s?he should be aware of what > happens when the library is loaded or a mode is turned on. > > Have you noticed an actual problem in this regard? No yet.