[gnu.emacs.bug] emacs bug/addition

mlevin@jade.cc.tufts.edu (Michael Levin) (10/02/89)

Hi -
   I would like to report a possible bug, and to suggest a feature.
What I wanted to do (the feature) was to make an internal help feature,
which would use the minibuffer to accept a string from the user, then
split the screen into 2 halves, showing output of the unix man command
on the string in one window, and your code in the other.  This would
be useful to for example, C programmers - you could get help on
some unix system call, and change your code while looking at the parameter
list, etc.
Anyways, I wanted to use the shell-command command.  The problem is,
if you don't give it an argument, Emacs complains when you try
to activate it (by binding it to a key and then pressing it) saying
wrong number of arguments, or something like that.  If you do give
it an argument, it passes the argument to the shell (or whatever
program you have defined as the shell) and never uses to minibuffer
to ask the user anything (as the manual says it should).
I temporarily solved the problem by using the Lisp read function.
I would like your opinion as to why the shell-command bypasses the
minibuffer (or how to make it work without the argument).
In addition, is there any internal variable acessible to lisp
procedures in the .emacs file which keeps the text in the current
mark-ring region? If so, this can be an even better feature -
just set the mark before the command you want help for, go to the
end of the command, and press some key.  The function would then
pass the contents of the mark buffer to the man command of the shell,
etc.  This is a very useful feature, which is used in the Turbo C
compiler environment.  I would be grateful for any opinions or
suggetions you may have on making this feature.  If you suggest
something which I am able to get working, I would be glad to send
you the code so that you can distribute it (and improve on it).
Thank you for your time.
                                 Michael Levin (mlevin @ JADE at Tufts U.)