[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Franz/Emacs Quick Reference Card

[Apologies to anyone for which a 700 line email message is too long]

Below is the TeX source for a quick and dirty Franz+Emacs reference card,
closely modelled on the GNU Emacs reference card.  I did it really for my own
purposes, to summarize function & variable names (and key bindings for the
emacs interface) in Franz 4.1 for easy access.  I'm sending it out here in
the hope that it will be generally useful.  See the head of the file for
TeX'ing instructions and permissions.  You will need a dvips-like program to
use the 3 columnsperpage that is set by default.  If you need the postscript
(e.g. don't have TeX), I might be able to send it to you.  Is there anywhere
to dump it for FTP?  NASA frowns on ftp.  Bugs/suggestions welcome, but I
can't put much more time into it, real patches preferred.

Cheers -- Kevin Thompson
kthompso@ptolemy.arc.nasa.gov     Artificial Intelligence Research Laboratory
(415) 604-4767 (voicemail)        NASA-Ames Research Center, Moffett Field, CA

% Reference Card for Franz/Emacs Interface (FI), as reported in 4.1 manual.
% Last edited: Thu Apr  9 15:05:43 1992 by kthompso (Kevin Thompson) on muir

%**start of header

% This file can be printed with 1, 2, or 3 columns per page (see below).
% Specify how many you want here.  Nothing else needs to be changed.


% Copyright (c) 1992 by no one.  e.g. distribute it at will, subject to
% permissions below.
% Author: (e.g. please send obvious bugs to)
%  Kevin Thompson
%  NASA Ames Research Center, Artificial Intelligence Research Branch
%  Internet: kthompso@ptolemy.arc.nasa.gov
% Of course, noone makes any claims on this, nor do I promise to "support" it.
% Thanks to Stephen Gildea, Paul Rubin, Bob Chassell, Len Tower,
% and Richard Mlynarik for the excellent GNU Emacs reference card on which
% this is based.
% The idea of this was to have a piece of paper that prods your memory if
% you've forgotten the name of a function, a keybinding, etc.  It assumes
% pretty serious familiarity with the manual, but hopefully saves the effort
% (in conjunction with all the online manuals) of lugging out the
% 20-pound beast in most cases.  It of course reflects my (the author's)
% biases about what was likely to be interesting or used often; for example,
% I left out the FI functions having to do with lisp listener and inverse
% definition mode, because I haven't yet had much reason to use these.
% To view, do 'tex ref.tex'.  To print if you use columnsperpage=3, you must
% use have a dvips-like program that prints in landscape format; see below.

% This file is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY.  No author or distributor accepts responsibility to anyone
% for the consequences of using it or for whether it serves any particular
% purpose or describes any piece of software unless they say so in writing.  
% Permission is granted to copy, modify and redistribute this source
% file provided the permission notices are preserved on all copies.
% Permission is granted to process this file with TeX and print the results.

% This file is intended to be processed by plain TeX (TeX82).
% The final reference card has six columns, three on each side.
% This file can be used to produce it in any of three ways:
% 1 column per page
%    produces six separate pages, each of which needs to be reduced to 80%.
%    This gives the best resolution.
% 2 columns per page
%    produces three already-reduced pages.
%    You will still need to cut and paste.
% 3 columns per page
%    produces two pages which must be printed sideways to make a
%    ready-to-use 8.5 x 11 inch reference card.
%    For this you need a dvi device driver that can print sideways.
% Which mode to use is controlled by setting \columnsperpage above.

\def\version{March \year\ v\versionnumber}

\def\shortcopyrightnotice{\vskip 1ex plus 2 fill \centerline{\small March
  \year by Kevin Thompson.  Permissions on back.  v\versionnumber}}

\vskip 1ex plus 2 fill\begingroup\small
\centerline{Designed by Kevin Thompson (kthompso@ptolemy.arc.nasa.gov), 3/92.}
\centerline{Permission is granted to make \& distribute copies}
\centerline{of this card provided this permission notice is preserved.}

% ===================================================================
% Macros to define this "mode".
% ===================================================================
% make \bye not \outer so that the \def\bye in the \else clause below
% can be scanned without complaint.



  column\if 1\ncolumns\else s\fi\space per page]}

\def\scaledmag#1{ scaled \magstep #1}

% This multi-way format was designed by Stephen Gildea October 1986.
\if 1\ncolumns
  \hsize 4in
  \vsize 10in
  \voffset -.7in
  \font\titlefont=\fontname\tenbf \scaledmag4
  \font\secfont=\fontname\tenbf \scaledmag3
  \font\subsecfont=\fontname\tenbf \scaledmag2

  \hsize 3.2in
  \vsize 7.95in
  \hoffset -.75in
  \voffset -.745in
  \font\titlefont=cmbx10 \scaledmag3
  \font\secfont=cmbx10 \scaledmag2
  \font\subsecfont=cmbx10 \scaledmag1
  \normalbaselines\rm		%make definitions take effect

  \if 2\ncolumns
    \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
  \else \if 3\ncolumns
    \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
    \errmessage{Illegal number of columns per page}

      % This next line is useful when designing the layout.
      %\immediate\write16{Column \folio\abc\space starts with \firstmark}
      \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
      \else\if a\abc
	\global\setbox\columna\columnbox \global\def\abc{b}
        %% in case we never use \columnb (two-column mode)
        \global\setbox\columnb\hbox to -\intercolumnskip{}
	\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}

    \if a\abc \else\null\vfill\eject\fi
    \if a\abc \else\null\vfill\eject\fi

% we won't be using math mode much, so redefine some of the characters
% we might want to talk about



\parindent 0pt
\parskip 1ex plus .5ex minus .5ex



%\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}

%% KOT redefined a bit
\outer\def\title#1#2{{\titlefont\centerline{#1}}{\titlefont\centerline{#2}}\vskip 1ex plus .5ex}

%  \vskip 3ex plus 2ex minus 2ex {\subsecfont #1}\mark{#1}%
%  \vskip 2ex plus 1ex minus 1.5ex}

%% KOT redefined to cram more on
  \vskip 3.0ex plus 0.95ex minus 1.7ex {\secfont #1}\mark{#1}%
  \vskip 1.8ex plus 0.9ex minus 1.15ex}

  \vskip 3.0ex plus 0.95ex minus 1.7ex {\subsecfont #1}\mark{#1}%
  \vskip 1.8ex plus 0.9ex minus 1.15ex}

  \vskip 1.0ex plus 0.95ex minus 1.7ex {\subsecfont #1}\mark{#1}%
  \vskip 0.8ex plus 0.9ex minus 1.15ex}




\def\<#1>{$\langle${\rm #1}$\rangle$}

\def\kbd#1{{\tt#1}\null}	%\null so not an abbrev even if period follows

{\obeyspaces\global\let =\ }

\def\key#1#2{\leavevmode\hbox to \hsize{\vtop

\def\com#1#2{\leavevmode\hbox to \hsize{\vtop

\def\lcom#1#2{\leavevmode\hbox to \hsize{\vtop

\setbox\metaxbox\hbox{\kbd{M-x }}

\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
  \hskip -\metaxwidth minus 1fil


%**end of header
% ===================================================================
% Meat of the bloody thing starts here.
% ===================================================================
\title{Franz Allegro CL/Emacs}{Interface Reference Card}

\centerline{(for ACL 4.1, FI 2.0, Emacs 18.58, Epoch 3.2)}

This reference card is a quick-and-dirty guide to those parts of Allegro
Common Lisp that are not defined in Steele but are likely to be used often.
It includes most of the FI (Franz Interface to emacs), plus many of the
extensions defined in the {\it Allegro CL User Guide}.  It is {\it not} a
substitute for that manual.

\section{The Franz/Emacs Interface (FI)}

You can use the franz interface from either GNU Emacs 18.58 or Epoch 3.2
(Franz-patched).  Put this line in your {\tt .emacs} file:

\kbd{(load "fi/site-init")}

Or do \kbd{M-x load-library RET fi/site-init}.

Then invoke lisp with \kbd{M-x fi:common-lisp} (\kbd{C-c !}).  This
function takes it defaults from the variables:


For online help with emacs, use \kbd{C-h f}, \kbd{describe-function}.

\shortsubsection{Subprocess: General interaction}

These keys provide the functionality that a shell buffer would have.  All
the special characters (^C, ^D, ^W, ^U, etc.) are handled by these functions.

\key{fi:interrupt-listener}{C-c C-c}
\key{fi:lisp-sync-current-working-directory}{C-c =}
\key{fi:subprocess-backward-kill-word}{C-c C-w}
\key{fi:subprocess-beginning-of-line}{C-c C-a}
\key{fi:subprocess-input-region}{C-c RET}
\key{fi:subprocess-kill-input}{C-c C-u}
\key{fi:subprocess-kill-output}{C-c C-k}
\key{fi:subprocess-quit}{C-c C-\\}
\key{fi:subprocess-send-eof}{C-c C-d}
\key{fi:subprocess-send-flush}{C-c C-o}
\key{fi:subprocess-show-output}{C-c C-v}

\shortsubsection{Subprocess: Superkeys}

Keys with special meaning at end of listener.  In effect only when variable
{\tt fi:subprocess-enable-superkeys} is non-nil.


\subsection{Editing Lisp Forms (general)}

Functions in this category allow editing of lisp forms in either listener or
code buffers.

\key{fi:center-defun}{C-c ^}
\key{fi:comment-region}{C-c ;}
\key{fi:end-of-defun}{C-c C-e}
\key{fi:extract-list}{C-c \%}
\key{fi:super-paren}{C-c ]}
\key{fi:toggle-to-lisp}{C-c l}

\subsection{Subprocess: Editing}

Special functionality when editing forms in a listener.

\key{fi:inferior-lisp-input-list}{C-x RET}
\key{fi:list-input-ring}{C-c C-l}
\key{fi:pop-input}{C-c C-p}
\key{fi:push-input}{C-c C-n}
\key{fi:re-search-backward-input}{C-c C-r}
\key{fi:re-search-forward-input}{C-c C-s}

\subsection{Editing Common Lisp code}

Functions for editing in code buffers.  

\key{fi:common-lisp}{C-c !} 
\key{fi:lisp-eval-or-compile-current-buffer}{C-c C-b}
\key{fi:lisp-eval-or-compile-last-sexp}{C-c C-s}
\key{fi:lisp-eval-or-compile-region}{C-c C-r} 
\key{fi:log-functional-change}{C-c -} 

%% pretty redundant, not sure they need to be there.

\subsection{Online Manual}

Invoke with \kbd{fi:clman}, these are used to view manual.  Packages
nicknames limit search: cltl1, comp, composer, defsys, excl, ff, inspect,
ipc, lisp, mp, prof, stream, sys, tpl, xcw, xref.  Note the useful about-*
man pages (e.g. about-top-level).

\key{fi:clman-flush-doc}{C-c C-c}

\shortsubsection{Invoking Composer Functions from FI}


\shortsubsection{Lisp environment interaction}

Functions to get information from Lisp environment, or change its
internal state.  Available from editor or listener buffers.

\key{fi:kill-definition}{C-c k}
\key{fi:lisp-apropos}{C-c ?}
\key{fi:lisp-delete-pop-up-window}{C-c SPC}
\key{fi:lisp-find-definition-other-window}{C-c 4 .}
\key{fi:lisp-find-definition}{C-c .}
\key{fi:lisp-find-next-definition}{C-c ,}
\key{fi:scan-stack}{C-c s}

\shortsubsection{Scanning Stack Mode}

Functions to scan stack from emacs (use \kbd{fi:scan-stack}). %, \kbd{C-c s}).

\key{fi:ss-continue}{C-c C-c}
\key{fi:ss-pop}{C-c C-p}
\key{fi:ss-reset}{C-c C-r}
\key{fi:ss-lisp-delete-pop-up-window}{C-c SPC}

\shortsubsection{FI Hooks}

These are user-settable variables to customize FI.



\subsection{Definitions and Definition Mode}

Viewing object definitions.  Used by \kbd{fi:list-who-calls} and definitions
functions below. Note cross-referencing must be on.



\shortsubsection{Miscellaneous FI Functions}


\shortsubsection{Miscellaneous FI Variables}


\section{Allegro Common Lisp}

The remaining sections summarize features of Allegro Common Lisp.  Commands
are entered by beginning with the special character \kbd{:}.  Use
\kbd{tpl:alias} to define your own commands.

\shortsubsection{File and Directory Commands}

%% not sure whether this emph works, might want to change it.
%% That part is used to mark what is the least needed to type in.
\def\emph#1{\it #1}

\com{cd}                      {change into another dir}
\com{cf}                      {compile a file}
\com{{\emph cl}oad}           {compile and load a file}
\com{{\emph di}rs}            {print directory stack}
\com{ld}                      {load one or more files}
\com{popd}                    {cd into previous entry on dir stack}
\com{{\emph pu}shd}           {push pwd on dir stack, cd to another}
\com{{\emph pw}d}             {print process working dir}

\shortsubsection{Stack Debugging Commands}

\com{boe}                     {Mark frame to break when exited}
\com{{\emph bo}ttom}          {Zoom at oldest stack frame}
\com{bt}                      {Zoom in a very brief manner}
\com{{\emph cur}rent}         {current stack frame}
\com{dn}                      {move down stack}
\com{{\emph ed}it}            {edit source for current frame}
\com{{\emph eval}mode}        {examine or set evaluation mode}
\com{{\emph fin}d}            {find a named stack frame}
\com{{\emph fr}ame}           {print info about current frame}
\com{{\emph fun}ction}        {print function of this frame}
\com{{\emph hid}e}            {hide stack frames}
\com{{\emph loc}al}           {print value of a local variable}
\com{{\emph res}et}           {return to top break level}
\com{pop}                     {pop up break levels}
\com{prt}                     {pop-and-retry}
\com{{\emph rest}art}         {restart function in current frame}
\com{{\emph ret}urn}          {return values from current frame}
\com{{\emph set-l}ocal}       {set value of a local variable}
\com{{\emph to}p}             {Zoom at newest stack frame}
\com{{\emph unh}ide}          {unhide stack frames}
\com{up}                      {move up stack frames}
\com{{\emph zo}om}            {print runtime stack}

\kbd{:zoom} args are {\tt :brief, :moderate, :verbose, :top, :bottom, :count,
:specials, :function, :relative}, and {\tt :all}.

\shortsubsection{Tracing and Stepping Commands}

\com{{\emph sc}ont}           {step `n' forms before stopping}
\com{{\emph so}ver}           {eval current form, stepping off}
\com{{\emph st}ep}            {turn on or off stepping}
\com{{\emph tr}ace}           {trace function arguments}
\com{{\emph untr}ace}         {stop tracing some or all functions}

\shortsubsection{Process Commands}

\com{{\emph arr}est}          {arrest a process for debugging}
\com{{\emph fo}cus}           {focus top level on a process}
\com{{\emph ki}ll}            {kill a process}
\com{{\emph pro}cesses}       {List all processes}
\com{{\emph unar}rest}        {revoke process' arrest reason}

\shortsubsection{Miscellaneous Commands}

%Use \kbd{:help} to get more info on each of these.

\com{EOF}                     {either :pop or :exit}
\com{{\emph ali}ases}         {print all command aliases}
\com{{\emph arg}s}            {save arguments before calls}
\com{{\emph cont}inue}        {continue from error}
\com{{\emph err}or}           {print last error message}
\com{{\emph ex}it}            {exit and return to shell}
\com{{\emph he}lp}            {print help text}
\com{{\emph his}tory}         {print recently typed inputs}
\com{{\emph i}nspect}         {inspect object}
\com{{\emph ma}croexpand}     {macroexpand argument}
\com{{\emph opt}imize}        {set compiler optimizations}
\com{{\emph pa}ckage}         {go into a package}
\com{{\emph pri}nter-variables} {set printer control variables}
\com{{\emph wd}ebug}          {create window debugger}
%\com{who-binds}              {find bindings of a variable}
%\com{who-calls}              {find callers of a function}
%\com{who-references}         {find references to a variable}
%\com{who-sets}               {find setters of a variable}
%\com{who-uses}               {find references of a variable}
\com{{\emph wi}nspect}        {window inspect a component or *}

\subsection{Operating System Interface}




\subsection{Source File Recording}


\subsection{Cross Referencing}

Functions with command equivalents marked by ``$\dagger$''.




\subsection{Using Composer}

Mostly self-expanatory, start with \kbd{composer:start-composer}.