[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed new commands, and sundry remarks.
- To: (BUG ZWEI) at MIT-AI, (BUG EMACS) at MIT-AI
- Subject: Proposed new commands, and sundry remarks.
- From: GLS at MIT-AI (Guy L. Steele, Jr.)
- Date: Mon ,31 Mar 80 05:46:00 EDT
- Cc: GLS at MIT-AI, INFO-EMACS at MIT-AI
Comments solicited on the following suggestions (which are NOT from
an EMACS or ZWEI implementor necessarily).
I suggest that Help mention Undo explicitly, to help the naive user.
Perhaps Help U should do Undo.
On the other hand, I wish that Undo were by default on some single keystroke.
I wish that some single keystroke (on a Knight keyboard) would do C-X B Return.
This is a VERY common operation (I assert; has any thought been given to
collecting statistics on which ^R commands (expecially C-X ones) are invoked
most often, for possible redistribution to easier-to-reach keys?).
Also, the Stanford E editor has an extremely winning feature whereby all the
buffers (actually files) are ordered on a pdl, and C-H exchanges the top two
on the PDL (like C-X B), but C-M-H rotates the top k (default k=3), n C-H
rotates the top n, and n C-M-H rotates the top n and sets k to n. This allows
easy running among three or more files. Specifying a file explicitly is like
saying n C-H, where the file is n'th from the top of the pdl. Perhaps
similar operations for the point/mark pdl and kill ring would also be useful.
I want to yell some more for C-M-O => C-O, and C-M-O = ^R Stack List Vertically.
I propose some commands which I believe would make LISP editing easier,
and I wish I had them right now:
(1) ^R Inject Arguments (suggested key: C-M->):
n C-M-> means: n C-M-F ) C-B n C-M-B ( Space C-B [n positive]
n C-M-B ( Space n C-M-F ) C-M-P C-B C-B [n negative]
That is, take the following n s-expressions, wrap them up in a pair of
parens, put a space after the left paren and the cursor before that.
This prepares to make a new level of function call with the s-expressions
as arguments.
(2) ^R Extract Arguments (suggested key: C-M-<):
n C-M-< means: n C-M-F C-Space n C-M-B C-W C-( C-M-K C-Y
except that the kill ring is not affected (but Undo can undo it).
This takes n s-expressions and deletes the s-expression containing them,
then puts them back in place of it. Perhaps typing C-M-< after an n C-M-<
should arrange to use the same n, i.e. allow incremental layers of list
structure. Maybe a zero argument should mean all s-expressions from
point to the enclosing ).
(3) I think I've suggested these before: LET Replace (LET Query Replace?),
and LET Displace (LET Query Displace).
LET Replace expects the cursor to be within a LET binding clause,
and replaces all occurrences of the variable in the LET body with the
corresponding expression. Maybe if the cursor is in front of the set
of bindings it does them all.
LET Displace does the inverse operation. It reads an expression
and a variable, replaces occurrences of the expression with the
variable in the body, then creates a new LET binding clause.