[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: ill-advised changes [was key bindings in hideshow.el]

From: Eric M. Ludlam
Subject: Re[2]: ill-advised changes [was key bindings in hideshow.el]
Date: Wed, 7 Feb 2001 16:50:22 -0500

>>> Richard Stallman <address@hidden> seems to think that:
>    It seems that M-o, M-p and M-n are still free.  Maybe one of those
>    could be reserved for minor modes, too?
>Maybe it might be reasonable to reserve M-o for minor modes.  M-o is
>not used by Dired as far as I can see.

Not my coveted M-o!  ;)  (I happen to have a C-o like binding to M-o
which I love dearly)

On the topic of Keybindings, and standards:

I've been teaching basic Emacs classes for about 6 years at the
different companies I've worked at.  One thing I always try to explain
in this class is that the keybindings are logical.  "f" means
forward.  Ctrl, Meta, and Ctrl-Meta then do logical things from there.

I think choosing those Meta keys because they are unbound for minor
modes is unwise because the existing C- versions are extensible within
the context of the originating key.  Perhaps a good function for M-o
and C-M-o based on C-o's meaning of opening up a line will present
itself.  For example, my version of M-o is duplicate the current line.
C-M-o as duplicate line, and increment numbers.  They were posted to
ges several years ago and I can re-propose them here if desired.

Based on convention, however, I do think that M-p, and M-n could be
documented as usable by major modes dealing with structured data,
history, or whatever.

Back to Minor Mode standards:

I think there are several kinds of minor modes:

1) Add keyboard-hidden feature (eg auto-fill-mode & eldoc, font-lock)
2) Add complex new functionality and command set.  (eg checkdoc, twocolumn)
3) Folding modes (eg outline-minor-mode, hideshow, folding, etc)
4) Keyboard Emulation (eg tpu, crisp, etc)

I grepped around, and it seems to me that folding modes are special in

a) There are several of them
b) Keybindings should be easy to type to aid navigation.

It may be worth looking at outlining (hiding,showing) as a special
support case for Emacs bindings, and possibly standardizing the tools.

Since outline-minor-mode is well established, it's style of
keybindings could be used.  Of course, there are several C-x postfixes
that aren't being used like c and p.

There are also well used prefixes like C-x r, and C-x v with lots of
extra room in them.

Lastly, after a home for the keys are found, outlining modes could be
granted dispensation for use of extended keys, like [C-End] or [F8] or
whatever for faster typing on X consoles or on Windows.

Once that is worked out, a few base functions, similar to "C-x $"
could be applied, which these minor modes override, providing a
consistent interface to selective display.  Maybe "C-x $" could be
used as one of the controlling keys in this new model.

Back to M-n, and M-p: These keys are already used for structured
buffers for navigation over special types of data.  Since folding
implies structure, these might be useful navigators for a unified
folding keybinding set.  Their use in major modes would then need to
be documented more clearly as to when they can be used.

Anyway, enough mumbling for me.  I don't even use folding modes. :)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]