gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] New PEG: prefix_argument--benja


From: Benja Fallenstein
Subject: Re: [Gzz] New PEG: prefix_argument--benja
Date: Sat, 16 Nov 2002 18:04:48 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1

Tuomas Lukka wrote:

Bindings usually use the prefix argument in one of two ways:

  - "Prefix or other:" If there is no prefix argument, the cell
    accursed in the other window is used instead. Examples:
    Connect, Put (see ``containment--benja``), Go (the 'g' key).
  - "Prefix or this:" If there is no prefix argument, the cell
    accursed in *this* window is used instead. Examples:
    Hop, Break, Clone, Delete, Excise, New Cell.

This feels a bit complicated way to explain this. I agree with the result but it *might* be better to explain this instead by
saying that if there's no marked cells, the prefix argument
is either the this or other.


The good point about this way is that we can directly derive function names from this explanation (prefixOrOther(), returning a list of cells). If we say that the prefix argument *is* the cell in this or the other window, naming the functions becomes harder...

Or hmm, we could say that each window has its own prefix arg, and the flavors are taking this window's (thisPrefix()) or the other window's (otherPrefix()). Hmm. I don't think that makes it easier to understand...

so we need a third case here. There may be
more special cases, but the above are the usual ones.

In the future, it should also be possible to set the prefix argument
through at least two more mechanisms:

  - Entering a cell number. (If you've typed '``734``,' the cell
    of that number is the prefix argument.)
  - Building an expression, using menus. It should be possible
    to build expressions like "all emails on gzz-commits which
    are newer than three days" easily, using the zaubertrank.
    (Once such an expression is built, it'll become
    the prefix argument. For example, building the above expression,
    then hitting 't' and a direction will clone all those emails
    in a single rank.)

The details of these are out of scope for this PEG; a future PEG
will deal with them. Once they are implemented, the prefix argument
will be determined as follows:

  - The latest search result, cell number or expression, if any.
  - Else, the marked cells, if any.
  - Else, there is no prefix argument.

That means if you enter a cell number, then perform a search,
the cell number will be thrown away and the search will be
the prefix argument; if you perform a search and then enter
a cell number, the search will be thrown away; and so on.

Hmm... how do I search and then leave the search result in the background
for a moment?


Mark it (in a different mark set if you have cells marked already).

Actually, I'm not completely sure that using the marked cells like this
is good, without being specific: I'd prefer saying

        "Ok, now with the marked cells, do X"

instead of accidentally using the marked cells when moving around to mark cells.


Hm, I don't quite follow yet. Can you give an example where this would be a problem?

Thanks,
- Benja






reply via email to

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