Fwd: [climacs-devel] "Vial" mode for Climacs?

Troels Henriksen athas at sigkill.dk
Thu Oct 26 08:35:44 UTC 2006


"Brad Beveridge" <brad.beveridge at gmail.com> writes:

> So the problem here is that I want to rebind keys at a very general
> level, but sub-modes of Climacs will go and blow away my bindings when
> the more specific mode becomes active?  At the same time I want to
> keep the same modes of Climacs, because modes effect things like
> syntax as well as key bindings.  I would like to prevent sub-modes
> from breaking the Vial bindings, but keep the other mode features.  I
> also want to provide my own sub-mode maps that _will_ effect the Vial
> commands.  This sounds like something of a thorny problem.

Indeed, very thorny. The best approach, I think, would be to consider
Climacs a set of libraries, instead of trying to actually make it
mutable into a Vi-like editor. This would also fit nicely into my
overall diabolical plot, which is basically to make Climacs be just a
"thin" wrapper over a set of powerful, general and reusable libraries.

>  Any pointers on where to look in Climacs so that I may begin to
> understand what work is required here?

Look at the generic function `find-applicable-command-table' in
ESA. Methods defined on that function are responsible for the
syntax-specific command tables in Climacs.

> I like the sound of this idea.  Is this experimental command processor
> in ESA cvs right now?  Also, when you say "fed gestures" I assume you
> mean that the command processor is getting input from McClim?

Yes, McCLIM ultimately handles the low-level gesture reading, but at
some point, the gesture will go through a `process-gesture' generic
function for the command processor. The motivation for this was to use
the same code for command-loop-based and event-based command
processing, but it could be used to implement completely non-CLIM-like
command semantics as well, I guess.

The experimental ESA is not in CVS, because it breaks Climacs and is
used for some otherwise pretty intrusive McCLIM word I'm doing. If you
just want to take a look at it, see mcclim-drei/ESA/esa.lisp from
http://sigkill.dk/code/mcclim-drei.tar.gz

> I think there is a gap in my understanding here.  I don't see how
> command tables would fit in with a Vi-style command processor module
> in ESA.

You'd need command-tables to organise commands and have
syntax-specific commands under all circumstances.

> I don't mind a lot of work in the long run, but I'm the type of person
> who likes/needs gratification early, so I hope that getting something
> half baked working will be pretty fast :)

In that case, I'd recommend that you start out by using Climacs as a
library (switch to the Climacs buffer protocol, perhaps the syntaxes,
etc) in an independent application, and wait a while before attempting
to implement Vial in Climacs.

-- 
\  Troels "Athas"
/\ Henriksen



More information about the climacs-devel mailing list