From: CSBVAX::MRGATE!RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP 14-SEP-1988 00:22 To: ARISIA::EVERHART Subj: RE: TPU key bindings and the CHOICES buffer Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Tue, 13 SEP 88 10:43:40 PDT Received: from NMFECC.ARPA by KL.sri.com with TCP; Tue, 13 Sep 88 10:31:14 PDT Received: from atf.mfenet by ccc.mfenet with Tell via MfeNet ; Tue, 13 Sep 88 10:30:27 PDT Date: Tue, 13 Sep 88 10:30:27 PDT From: TOLLIVER%ATF.MFENET@NMFECC.ARPA Message-Id: <880913103027.20200215@NMFECC.ARPA> Subject: RE: TPU key bindings and the CHOICES buffer To: INFO-VAX@KL.SRI.COM Comment: From TOLLIVER@ATF.MFENET on 13-SEP-1988 13:30:29.14 EDT I can't remember if the question about binding keys to EVE commands such as GET FILE was ever answered satisfactorily. [There is so much traffic on INFO-VAX these days that I cannot keep up with the little that interests me :-(] But since comments about the problem still seem to be appearing, here is my solution. This TPU procedure should allow binding of any EVE command that uses the choices buffer to a key while still supporting the choices buffer. You just have to supply the prompt to be used and the proper response desired if the user gives a null response to the prompt. That is, if binding a key for GET FILE, then your specified prompt and null-response will be used instead of the ones built in to the EVE_GET_FILE procedure. For consistency, look in the original EVE procedure to see what prompt and null-response is used there and use those. At the end of the procedure is a sample DEFINE_KEY command that binds GOLD F to GET FILE. Similar DEFINE_KEY's work great for INCLUDE FILE (GOLD I) and BUFFER (GOLD B). [All this is for VMS V4.7. I don't know about the new TPU yet.] procedure jst$command_with_choices (this_command, prompt, null_response) local answer, previous_do_line, previous_parsed_do_line; previous_do_line := eve$x_do_line; previous_parsed_do_line := eve$x_parsed_do_line; answer := read_line (prompt); if answer <> eve$kt_null then eve$enter_command_window; copy_text (this_command + " " + answer); eve$exit_command_window; else message (null_response); endif; eve$x_do_line := previous_do_line; eve$x_parsed_do_line := previous_parsed_do_line; endprocedure ! define_key ("jst$command_with_choices ('get file', 'File to get: ', 'No file specified')", key_name ("f",shift_key), "get_file", jst$x_standard_keys); Be sure to put this key in the proper key-map. The key-map used here, jst$x_standard_keys, is non-standard. Also, the (double-) quoted first argument to define_key must be all on one line. That's no problem for TPU which is happy with long lines. But that may be a problem for various mailers around the network which cannot handle lines longer than 80 (72?) characters. So, I've split it up. You'll have to put it back together. By the way, the stuff about previous_do_line, etc. is to prevent the GET FILE (or whatever) from appearing in the command recall buffer. My command recall buffer only contains the commands actually entered by the user with DO. There is no need to save the GET FILE in the buffer since it is now so easy to just get it again by using GOLD F again. Besides, spurious commands in the recall buffer that were never actually entered with DO sure would confuse some people to no end. John Tolliver (TOLLIVER%ORN.MFENET@NMFECC.ARPA) Oh no! Here comes a barrage of undeliverable mail messages :-(