Using the CLHS with Konqueror's "Enhanced Browsing"

If you're like me and you dig the KDE web/file browser for its "Web Shortcuts" (like 'ggg:split-sequence' for a Google Group Search), here's a nice quickie for Common Lisp users: If you have a current version of LispWorks (or another local copy of the CLHS), cd to the directory where the CLHS symbol table is located. On my machine (LispWorks for Linux Personal Edition 4.1.20) the file you're looking for is "Map_Sym.txt" and the directory is "/usr/local/lib/LispWorksPersonal/lib/4-1-0-0/manual/online/web/CLHS/Data/". Start the little Perl script below with Map_Sym.txt redirected to stdin, i.e. something like './ < Map_Sym.txt'. Now you can start KDEs Konqueror, open its settings and add a new 'Web Shortcut', something like:

You can now type URIs like 'cl:*print-circle*' or 'cl:make-method' and Konqueror will open the correct page from your local copy of the CLHS. That's it...

Note 1: The following six entries won't work due to the Unix file naming conventions:

Note 2: All input should be lowercase. If you don't like that, replace 'lc' with '$_' in the Perl script.

Note 3: You should make sure you have a current version of the CLHS. See this note from the CLHS's author Kent Pitman.

Here's the Perl script:


while (<>) {
    if m#/#;
  $url = <>;
  chomp $url;
  link $url, sprintf "../Body/link_%s.html", lc
    or die $!;

$Header: /usr/local/cvsrep/,v 1.6 2006-08-28 11:32:15 edi Exp $