unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: `C-x n s' binding in org-mode
Date: Sun, 22 Jun 2008 14:15:43 +0200	[thread overview]
Message-ID: <28885A86-C4E6-4FDF-ACF5-32D93E5432C6@gmail.com> (raw)
In-Reply-To: <jwvmyldwujr.fsf-monnier+emacs@gnu.org>


On Jun 22, 2008, at 2:05 PM, Stefan Monnier wrote:

>> Org-mode adds a local binding to the `C-x n' keymap.
>> This really confused me for a while because I global rebind `C-x n'  
>> to
>> be something entirely different, so in org-mode, I ended up with a
>> keymap containing _only_ the org-mode binding, erasing my personal
>> binding.
>
>> Anyway, this binding seemed pretty dodgy to me; what do others think?
>
> The binding seems to make sense, although it's obviously not following
> the major mode binding conventions.

When making this binding, I loosely justified it for myself with this
section from the Emacs Lips Manual, "Major Mode Conventions"

      It is legitimate for a major mode to rebind a standard key
      sequence if it provides a command that does "the same job" in a
      way better suited to the text this mode is used for.  For example,
      a major mode for editing a programming language might redefine
      `C-M-a' to "move to the beginning of a function" in a way that
      works better for that language.

      It is also legitimate for a major mode to rebind a standard key
      sequence whose standard meaning is rarely useful in that mode.   
For
      instance, minibuffer modes rebind `M-r', whose standard meaning is
      rarely of any use in the minibuffer.  Major modes such as Dired or
      Rmail that do not allow self-insertion of text can reasonably
      redefine letters and other printing characters as special  
commands.


Using this philosophy, Org rebinds C-a, C-e, and C-k to slightly modify
the behavior of these functions in headlines with tags.

C-x n s  seemed a logical key for this.

- Carsten





  reply	other threads:[~2008-06-22 12:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-22  7:30 `C-x n s' binding in org-mode Miles Bader
2008-06-22  9:20 ` Bastien
2008-06-22  9:23 ` Lennart Borgman (gmail)
2008-06-22 12:05 ` Stefan Monnier
2008-06-22 12:15   ` Carsten Dominik [this message]
2008-06-22 12:39     ` Lennart Borgman (gmail)
2008-06-22 21:35     ` Stefan Monnier
2008-06-23  0:38       ` Miles Bader
2008-06-23  1:20         ` Stefan Monnier
2008-06-23 14:14     ` Richard M Stallman
2008-06-23 14:17       ` Miles Bader

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=28885A86-C4E6-4FDF-ACF5-32D93E5432C6@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).