Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

November 2003
Sun Mon Tue Wed Thu Fri Sat
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
Oct  Dec

R5RS in Info format in Emacs

Monday, November 3, 2003

When I'm working with Scheme code (or any code, actually) in Emacs, I prefer reading documenation in info over using a browser because:

For example, I've downloaded the R5RS document (in info format) from http://swissnet.ai.mit.edu/ftpdir/scm/r5rs.info.tar.gz and installed it in my Emacs. I then added the following code to my .emacs file so that I can jump to the definition of any keyword defined in r5rs when I press "F1" with the cursor on the keyword:
(add-hook 'scheme-mode-hook
	  (lambda ()
	    (define-key scheme-mode-map [f1]
	      '(lambda ()
		 (interactive)
		 (ignore-errors
		   (let ((symbol (thing-at-point 'symbol)))
		     (info "(r5rs)")
		     (Info-index symbol)))))))
This works well (and is very fast) for generic r5rs scheme code. However, r5rs.info is the "Scheme specification" documentation, not the "PLT Scheme implementation" documentation (which is both r5rs plus extensions). I would prefer to open one of the PLT Scheme language manuals at the appropriate place when I'm working with some PLT-specific code which I'm not familiar with. I know that Quack will open the appropriate html page in the PLT documentation for a keyword with "C-c C-q k" but it doesn't position to the correct place in the document (this appears to be a Windows-related bug as it jumps to the correct place when the code is called on a linux box). It's also (relatively) slow to open the browser each time I want to see a keyword definition.

It would be great to have access to the PLT documentation in info format.

emacs Copyright © 2004 by Bill Clementson