[Top][All Lists]

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

RE: propose adding Icicles to Emacs

From: Drew Adams
Subject: RE: propose adding Icicles to Emacs
Date: Sun, 1 Jul 2007 14:54:52 -0700

>     If the same function is used to act on a single candidate and
>     to act on all matching candidates, then you can get into
>     trouble. The candidate action function takes a candidate and
>     does something with it. You are talking about a function that
>     takes a list of candidates and does something with that
>     list. That is not the same function.
> I understand that's the case with your implementation.
> I've envisioned another implementation in which multi-command
> behavior works through a loop in call-interactively.
> Thus, multi-argument input will be equivalent to
> running the command over and over, with each argument.

I know that.

> Except for one thing: the command can tell that it is
> being invoked for multi-command behavior. And it can do
> something different if it wants to.
> Do you see the idea now?

I believe I've seen your idea from the beginning, though we still have seen
no details, so it can be anything and everything ;-).

You say, "And [the command] can do something different if it wants to." That
was precisely my point. Somehow, someone needs to tell it whether, and if so
how, to let users do something different, if that is appropriate for that
particular command.

That is the same with my implementation, and, I think, with any
implementation. An operation on a set (list) is not necessarily the same
thing as N times _the same_ operation on each of its N elements. In the
general case - which we should provide programmers with, it is not the same.

The question is _how_ a programmer can indicate which function, if any, to
apply to the entire list (as a whole) and which function, if any, to apply
to each set member individually (all or selected members only). In some
cases it makes sense to let users do one, in some cases the other, and in
some cases both (separately).

In Icicles, the programmer who writes the command would do this by binding
appropriate variables to action functions, one for each desired behavior.
You might instead do this in any number of alternative ways, but you still
need to somehow let programmers control this. That was my point. "Do you see
the idea now?"

Are we talking about the same thing? Is it worth repeating what we're
saying? I'm not sure, at this point.

IMO, this is really a minor detail. There is a simple way to do this in
Icicles, and you can use a different simple way if you like.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]