bug#12132: 24.1; M-p and M-n should follow behave similarly to M-f and M
From:
Daniel Neel
Subject:
bug#12132: 24.1; M-p and M-n should follow behave similarly to M-f and M-b
Date:
Fri, 3 Aug 2012 13:00:55 -0400
Hello all. Below is a quick suggestion originally intended to be submitted as a bug. Sending through the mailing list because I don't have an email client set up in Emacs yet.
My suggestion is to, by default, bind some movement behaviors to the M-p
and M-n keys. Currently, the default left and right cursor movement keys are bound to C-f/b for going forward or backward by character, and M-f/b to go forward/backward by word.
The up and down analog, C-p/n to go up/down a line, does not currently
(that I know of) follow this same pattern, where Control is bound to a single unit of movement and Meta is bound to a larger semantic unit of movement. Some keys that could substitute for M-p/n are C-v and M-v, for
the equivalent of page up and page down. Binding these, or another similar set of keys, to M-p/n would follow the behavior of M-f/b and hopefully make the default key set a bit more intuitive.
Also, C-v and M-v don’t follow the convention of C-A for movement in one
direction, and C-B for movement in the other. Rather, they switch things up by binding Control to one direction and Meta to the other.
A potential problem here is that it looks like several other modes make
use of M-p/n for browsing through the command history in shells.
Anyways, that’s all for now. I probably underestimate how much effort such a change would involve, but this might go a small ways towards making
the default command set make more sense, and rely less on rote muscle memory.
In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-06-11 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version 11.0.11203000 Configured using: `configure '--prefix=/usr' '--sysconfdir=/etc' '--libexecdir=/usr/lib' '--localstatedir=/var' '--with-x-toolkit=gtk' '--with-xft'
'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro''
Important settings:
value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8
value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t
Major mode: Lisp Interaction
Minor modes in effect: erc-list-mode: t erc-menu-mode: t
erc-autojoin-mode: t erc-ring-mode: t erc-networks-mode: t erc-pcomplete-mode: t erc-track-mode: t erc-track-minor-mode: t erc-match-mode: t erc-button-mode: t erc-fill-mode: t
erc-stamp-mode: t erc-netsplit-mode: t erc-irccontrols-mode: t erc-noncommands-mode: t erc-move-to-prompt-mode: t erc-readonly-mode: t icomplete-mode: t global-auto-complete-mode: t
auto-complete-mode: t desktop-save-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t
auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t
Recent input: a n d SPC r e l y SPC l e s s SPC o n SPC r o t e SPC m u s c l e SPC m e m o r y . C-p C-p C-p C-l C-p C-l
C-p M-< M-> M-> M-< M-> M-< M-> M-< C-SPC M-> <C-insert> <down-mouse-1> <mouse-movement> <mouse-1> <S-prior> <S-next> <up> <up> C-n C-n C-l C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-n C-n C-l C-n C-n C-l C-n C-l C-n C-n C-l C-n C-n C-n C-l M-> M-< M-> <S-prior> <S-prior> <S-next> <down-mouse-1> <mouse-movement> <mouse-1> C-n C-n C-p C-n C-p C-n C-l C-n C-l C-n C-n C-l C-n
C-n C-l C-n C-p C-l C-n C-n C-l C-n C-e C-l C-n C-e C-l C-a C-e C-n C-e C-l C-n C-p C-p C-n C-n C-n C-l C-e C-n C-n C-n C-n C-n C-l C-n C-n C-l C-n C-l C-n C-l C-p C-l C-p C-p C-l C-e C-l <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> <down> C-n C-n C-n C-n C-l C-n C-n C-l C-n C-n C-l C-x o M-x C-g C-g C-h f f o l l
o w <tab> - m o d <tab> <return> C-n C-n C-p C-p C-l C-n C-p C-l C-p C-l C-p C-l C-p C-l M-< M-> M-< M-> C-x k <return> C-n C-p C-n C-n C-n C-x o <next> C-x o C-x b <return> C-x o C-x b s c r a t C-g C-g C-x
b * s c r a t c h * <return> <return> M-x C-g C-g C-h f r e p o r t <tab> - e m a <tab> <return> C-x o C-n C-n C-n C-n q n <backspace> C-n C-n M-x r e p o r t <tab> <return>
Recent messages: Making completion list... Type "q" in help window to restore its previous buffer. byte-code: End of buffer [2 times] Mark set [4 times] byte-code: End of buffer [3 times] scroll-up-command: End of buffer
Quit [4 times] Making completion list... Type "q" in help window to restore its previous buffer. byte-code: End of buffer byte-code: End of buffer