[I hope that you don't mind my jumping in with both feet. I think
that fresh eyes are valuable. After a short time one gets used to
things and no longer notices what would newbies stumble over.]
| From: Dave Anderson <anderson(a)redhat.com>
| D. Hugh Redelmeier wrote:
| > | > ==> It does not say in what way the terminal is not fully functional.
| > It seems to be coming from /usr/bin/less.
| Based upon running within that emacs/Jove environment I guess?
Based on $TERM ("vanilla") and the corresponding termcap or terminfo
entry. To see this, try:
TERM=vanilla less /etc/fstab
| > The code in main.c:setup_environment ought to use the PAGER
| > environment variable if it is defined.
| I prefer not to change the default behaviour based upon the
| user's PAGER variable.
The PAGER variable is a UNIX/Linux convention. Not too well
documented, but real. Kind of like EDITOR and VISUAL.
Now that I know how to avoid the problem, I don't care much for my own
sake.
| Yeah, the man page is pretty simple-minded. As you can see, I didn't
| write it, preferring to keep crash usage documentation self-contained
| within the utility itself.
Man pages are another good and longstanding UNIX/Linux tradition.
At a minimum, the man page should say that it is incomplete and that
the definitive documentation is the help command. It should also have
a FILES section to point out ~/.crashrc.
BTW, I tried
set edit emacs
and got
set: cannot change editing mode during runtime
I don't think that it would be hard to fix this:
- in cmdline.c:readline_init, change all calls to rl_bind_key to be
calls to rl_bind_key_in_map using the vi_movement_keymap keymap.
This way the emacs map won't get damaged.
Move these binding commands out of the "if" -- they need to be
executed unconditionally.
- each time where you would print the error message "cannot change
editing mode...", just do change it (i.e. change rl_editing_mode and
pc->editing_mode).
Is there a reason to have a pc->editing_mode? Could rl_editing_mode
suffice?
Note: I have not tested this and I've never programmed any readline
calls, so I might well be missing something.