[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
DrScheme as Emacs-like kitchen sink
I'd like to use DrScheme for other purposes than write/interpret/debug
Scheme code. I'd like DrScheme to e.g. edit Latex files, things I do
in Emacs, hence the `Emacs-like kitchen sink' title.
I'm sure DrScheme has no interest in porting all the Emacs Lisp files,
as badly written as it might be. But it doesn't follow from that that
DrScheme is only meant to write/interpret/debug Scheme code.
As to Latex files, let me make a suggestion. The Scheme indentation
is of course no good for Latex files, and one get rid of all
indentation in the menu
Edit -> Preferences -> Indenting
But of course, that's no good for Scheme files! Emacs handles this
sorta problem with modes, a file with extension tex will have
different indentation etc than a file with extension scm.
Dunno how hard modes would be to implement, and it's only a good idea
if DrScheme want to handle a Latex mode.
OK, but in Emacs, you can also read in a file other than your .emacs
file, as I am right now:
~/emacs-21.0.106/src/emacs -l ~/.sparc-linux-gnu.emacs &
DrScheme reads in the .mred.prefs file automatically. It seems like
it would be easy to get DrScheme to read in additional files. Say
drscheme -q -l .mred.textediting.prefs &
where -q would mean don't read in .mred.prefs, just like Emacs, and
.mred.textediting.prefs would be a version I'd create by killing the
indentation with the menu
Edit -> Preferences -> Indenting
That's probably fine for a Latex mode. Emacs goes to a lot of
trouble to handle line-breaking/word-wrapping in Latex mode, but it's
only needed because Emacs doesn't automatically have the Notepad style
wordwrapping that DrScheme has.
I'll give you an example, here's an abstract from a latex file that
Shriram gave me some good advice for whipping into shape:
\begin{abstract}
Felleisen's Standard Reduction Theorem for the $\l_v$ Calculus yields
an algorithm that models the Scheme interpreter. The $\b$-nf $\l$
Calculus analogue is Barendregt's Normalization Theorem. We give a
simple proof of this by porting and simplifying Felleisen's proof.
\end{abstract}
Now it's important in Emacs that M-q (fill-paragraph) doesn't clobber
this to
\begin{abstract} Felleisen's Standard Reduction Theorem ... porting
and simplifying Felleisen's proof. \end{abstract}
But I think DrScheme solves this problem like this: the user doesn't
type return when it's "fillable", so DrScheme shows this
\begin{abstract}
Felleisen's Standard Reduction Theorem for the $\l_v$ Calculus yields an algorithm that models the Scheme interpreter. The $\b$-nf $\l$ Calculus analogue is Barendregt's Normalization Theorem. We give a simple proof of this by porting and simplifying Felleisen's proof.
\end{abstract}
as
\begin{abstract}
Felleisen's Standard Reduction Theorem for the <-
$\l_v$ Calculus yields an algorithm that models the <-
Scheme interpreter. The $\b$-nf $\l$ Calculus <-
analogue is Barendregt's Normalization Theorem. We <-
give a simple proof of this by porting and <-
simplifying Felleisen's proof.
\end{abstract}
I can live with the squiggles on the right. And (I think) the
problem is solved!
Also, I'd like to use the DrScheme web browser instead of Netscrape,
maybe read comp.lang.scheme on DrScheme... I couldn't find any
documentation. It works, but I don't know how.
Hey I learned that Felleisen et al. revised their book HTDP through
the DrScheme web browser! I somehow hit HTDP and noticed that some
(actually well-known) typos I found were corrected. I'd been reading
an old static Rice version of HTDP, which of course didn't get
updated. But then I couldn't figure out *where* the updated HTDP was!
So I hunted for it in a search engine on Netscrape, and finally found
it, I'm pretty sure it's <http://www.htdp.org>, it oughta be. So I'll
go reread the book now. Anyway, I'm sure there was an easy way to get
DrScheme to tell me the URL :)
--
Bill
<http://www.math.nwu.edu/~richter>