[Openmcl-devel] Mouse Copy
R. Matthew Emerson
rme at clozure.com
Mon Nov 12 13:34:52 PST 2007
On Nov 12, 2007, at 2:45 PM, Rainer Joswig wrote:
> \what's the word on Mouse Copy? MCL has it. Clozure CL needs it,
> right?
>
> With 'Mouse Copy' one can click on Lisp expressions and they get
> inserted at the current point.
> If there is a selection, it will be replaced with the Lisp expression.
>
> MCL uses Command-Click.
>
> For example you can click on
> * an open parentheses and the whole S-Expression will be copied
> * a symbol and the symbol will be copied
> * the 'current expression' (number, character, string, ...) and it
> will be copied
>
> Also nice to have
> * a semicolon and the whole comment to the end of line will be copied
>
> It is a really nice feature and makes editing much easier.
>
> (LispWorks and Genera also have variants of it, the Mouse Copy from
> MCL is the nicest, IMHO).
It sounds like a good feature. I made a ticket for it so that we
don't forget about it.
http://trac.clozure.com/openmcl/ticket/177
I think that we want a pretty standard Mac OS-style text editing
interface, but using command-click for something like this probably
isn't a big problem. Normally, command-click is used to make non-
continguous selections, but multiple active regions aren't part of
Hemlock's view of the world anyway.
The editor is currently a big unusual in that parts of its
functionality are due to using the built-in behavior of NSTextView,
while other parts are provided by Hemlock.
For instance, you can currently use command-click to select multiple,
non-contiguous, bits of text, press command-E, and get them all
evaluated. This is done completely at the NSTextView level---Hemlock
has no idea of the selection. If you make a selection like this and
then try to say M-x Uppercase Region, for example, Hemlock says that
the current region isn't active.
Hemlock probably ought to be running the show (managing scrolling,
selection, etc.) more than it currently is.
More information about the Openmcl-devel
mailing list