rusty@sdcarl.UUCP (rusty c. wright) (05/12/85)
I came upon the following method to make up documentation for emacs until rms distributes the real stuff. It appears that there is a complete description of the emacs commands in the DOCSTR file in the etc directory. But the DOCSTR file isn't in a form that you want to read via "more", "lpr", etc. I wrote the following little C program to filter it through: main() { register int ch; while ((ch = getchar()) != EOF) { if (ch == 037) printf("\n\\subsection*{"); else putchar(ch); } } Then run it with a.out < DOCSTR > doc.tex (You'll need to add the version number onto the DOCSTR file name.) Then take the editor and add the closing } to all of the \subsection lines, add the appropriate \documentstyle..., \begin{document} and \end{document} lines, and then run it through LaTeX and voila! There are a couple of spots that could use a {description} environment. (Note to troff users: substitute .SH for the \subsection*{.) The next step is to make a file that has the key bindings/mappings. For this i used the command grep '(define-key' simple.el loaddefs.el > ~/ keys.tex Unfortunately the keys.tex file will require a fair amount of manual editing to get it into a useful form though. -- rusty c. wright {ucbvax,ihnp4,akgua,hplabs,sdcsvax}!sdcarl!rusty
ekrell@ucla-cs.UUCP (05/13/85)
In article <186@sdcarl.UUCP> rusty@sdcarl.UUCP (Rusty Wright) writes: >The next step is to make a file that has the key bindings/mappings. >For this i used the command > > grep '(define-key' simple.el loaddefs.el > ~/ keys.tex > >Unfortunately the keys.tex file will require a fair amount of manual >editing to get it into a useful form though. There is a better way of doing this: execute within gnu emacs a "describe-bindings" command to print out all current bindings into the *Help* buffer. Then, do an "lpr-buffer" on that buffer and you'll get a printout of the contents of that buffer. This is great!! -- Eduardo Krell UCLA Computer Science Department ekrell@ucla-locus.arpa ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell
mikem@uwstat.UUCP (05/13/85)
> The next step is to make a file that has the key bindings/mappings. > For this i used the command > > grep '(define-key' simple.el loaddefs.el > ~/ keys.tex > > Unfortunately the keys.tex file will require a fair amount of manual > editing to get it into a useful form though. Try using the "describe-bindings" command in (gnu)emacs and then save the output buffer in a file. Its much easier and more reliable (gets bindings from other packages too). --Mike -- Mike Meyer -- Phone +1 (608) 262-1157 (Leave messages at 262-2598) ARPA: mikem@Statistics <==> mikem@Wisc-Stat.ARPA UUCP: ...!{allegra,ihnp4,seismo,ucbvax,pyr_chi,heurikon}!uwvax!uwstat!mikem
rusty@sdcarl.UUCP (rusty c. wright) (05/13/85)
In my previous message i suggested as a way of getting a list of the key bindings to grep some .el files in the lisp directory. After perusing the document i produced via the DOCSTR file i came up with a better way to produce a list of key bindings (and that lists all of the key bindings; my previous scheme didn't). Use the command "describe-bindings". To use this command do an ESC x and then type describe-bindings. You will get a separate window & buffer which you can switch to with "ctl-x o" and then edit and format as you like and then save into a file. -- rusty c. wright {ucbvax,ihnp4,akgua,hplabs,sdcsvax}!sdcarl!rusty
bbanerje@sjuvax.UUCP (B. Banerjee) (05/14/85)
> I came upon the following method to make up documentation for emacs > until rms distributes the real stuff. It appears that there is a > complete description of the emacs commands in the DOCSTR file in the > etc directory. But the DOCSTR file isn't in a form that you want to > read via "more", "lpr", etc. I wrote the following little C program > to filter it through: > ... { Small Program follows} > Then run it with > > a.out < DOCSTR > doc.tex > The version appended to the end will make an 'nroffable' version. You will probably have to do some minor post-processing to ensure that the page breaks come out correctly. Use the output with the 'ms' macros. > The next step is to make a file that has the key bindings/mappings. > For this i used the command > > grep '(define-key' simple.el loaddefs.el > ~/ keys.tex > > Unfortunately the keys.tex file will require a fair amount of manual > editing to get it into a useful form though. There is an easier way. Type the following (verbatim) % emacs -l makesum M-X make-key-summary C-X C-W keys.summary C-X C-C You will then have a file called 'keys.summary' in your directory. Oh yes, the program. Apologies for the quick hack. -- Binayak =================================================== # include <stdio.h> main() { register int ch; register int notfirst; notfirst = 0; printf (".TL\n"); printf ("Command Summary For Gnu Emacs\n"); printf (".AU\nRichard M. Stallman\n"); while ((ch = getchar()) != EOF) { if (ch == '\037') { if ( notfirst) printf("\n.DE"); else notfirst = 1; printf("\n.SH\n"); while (( ch = getchar()) != '\n') if ( ch != EOF) putchar(ch); else { ungetc(ch); break; } printf("\n.DS L\n"); } else putchar(ch); } exit(0); } -- Binayak Banerjee {allegra | astrovax | bpa | burdvax}!sjuvax!bbanerje P.S. Send Flames, I love mail.