all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: Emacs developers <emacs-devel@gnu.org>,
	Tino Calancha <tino.calancha@gmail.com>
Subject: RE: ctl-x-map key binding conventions for new major/minor modes
Date: Sat, 13 May 2017 14:33:45 +0900 (JST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1705131416120.31835@calancha-pc> (raw)
In-Reply-To: <ba0f6529-b584-436e-9045-5cec96b079c6@default>



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.



  reply	other threads:[~2017-05-13  5:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13  3:49 ctl-x-map key binding conventions for new major/minor modes Tino Calancha
2017-05-13  5:10 ` Drew Adams
2017-05-13  5:33   ` Tino Calancha [this message]
2017-05-13  7:11     ` Eli Zaretskii
2017-05-13 14:16       ` Kaushal Modi
2017-05-13 14:33         ` Eli Zaretskii
2017-05-13 14:48           ` Kaushal Modi
2017-05-17  6:18       ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1705131416120.31835@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.