tmoody@sjuvax.UUCP (T. Moody) (02/17/88)
This is in fact a question about the micro-emacs 3.9e macro language... Recently, I downloaded micro-spell 1.0 from the "Programmer's Room" BBS in Indiana. One of the files is SCAN.CMD, and its purpose is to tell emacs how to scan through the unrecognized words in a file and prompt the user for the appopriate action. So, if you type "spell -e foo" at the DOS prompt, SPELL.EXE checks foo for unrecognized words, fires up emacs and runs the SCAN macro. What I want to do is to run micro-spell from within emacs, on a file that I am editing. One way to do this, of course, is to use shell-command to run micro-spell and create another copy of emacs in RAM. This is an extravagant waste of memory on a PC. A better way would be to have a shell-command to run SPELL.EXE on the current file, and then invoke the SCAN macro, and then quit back to emacs. But I can't get it to work that way. I tried, for example, using &cat to create the command line "spell foo" to use with the shell-command sequence. All this does is to create a new DOS shell, from which I must exit back into emacs. Here is the macro fragment: set %comline &cat "spell " $cfname shell-command @%comline execute-file "scan.cmd" Any ideas about how I might get this to work. In particular, is there a simpler way to put a shell-command with a context-dependent argument in a macro? -- Todd Moody * {allegra|astrovax|bpa|burdvax}!sjuvax!tmoody * SJU Phil. Dept. "The wind is not moving. The flag is not moving. Mind is moving."
nwd@j.cc.purdue.edu (Daniel Lawrence) (02/21/88)
In article <1173@sjuvax.UUCP> tmoody@sjuvax.UUCP (T. Moody) writes: > >This is in fact a question about the micro-emacs 3.9e macro language... > >What I want to do is to run micro-spell from within emacs, on a file >that I am editing. What version of MicroEMACS are you running? Version 3.9, which was the first distributed with MicroSPELL, included a word processing page to run the spell checker on the current file. Try calling up the word processing page (via F8) and using shift-F6 to spell check the file (or just look at the code if you are on a machine without function keys.) It shells out to run spell and then executes scan.cmd. >set %comline &cat "spell " $cfname >shell-command @%comline ^what is this for? an interactive prompt here???? This makes no sense...should the line be: shell-command %commline ? >execute-file "scan.cmd" >-- >Todd Moody * {allegra|astrovax|bpa|burdvax}!sjuvax!tmoody * SJU Phil. Dept. I hope this makes sense, if you still can't get it running, send me some more details (versions.. copies of files etc) and I will try to figure it out. Daniel Lawrence (317) 742-5153 UUCP: {ihnp4!pur-ee!}j.cc.purdue.edu!nwd ARPA: nwd@j.cc.purdue.edu FIDO: 1:201/2 The Programmer's Room (317) 742-5533