Next: , Previous: Alteration, Up: Further commands

4.4 Do What I Mean

Sometimes Versor deviates from its most logical design, to make sure that the selection ends up where you are likeliest to want it.

An example of this is that if you are moving by s-expressions, and move forward from the last one in the enclosing expression, the selection moves to the end of the last expression, and then on past any whitespace and comments, ending up where you are likely to want to type the next s-expression.

However, it is still not always possible to get to exactly the right place without using character-level movements. For these circumstances, Versor provides a “Do What I Mean” (DWIM) command, which moves the selection to a point likely to be of interest that is otherwise hard to get at using the current Versor dimension. This command is normally bound to the key M-home. Alternatively, it can be accessed with M-x versor-dwim.

This function reads the user's mind, using the following algorithm:

  1. Tell the user what has been done each time;
  2. Eventually, the user will come to expect the behaviour of this function;
  3. Reading what the user wants Versor to do should then usually be trivial.

Aspects of mental state not necessary for figuring out where to leave point are factored out of the calculations.

versor-dwim is mode-specific in its behaviour. For example, in programming language modes, it can move point in and out of string constants and comments. Logo