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

Differences between ZWEI and EMACS



There is a subtle difference between ZWEI and EMACS that many people
probably don't know about: while EMACS has a "mark PDL", ZWEI has a
"point PDL".  The EMACS mark is the same as the top of the mark PDL,
but the ZWEI mark has nothing to do with the point PDL.  The reason for
this was so that setting the mark for purposes of defining a region
would not interfere with the saved buffer pointers on the PDL; that
always bothered me in EMACS and I considered the ZWEI method an
improvement.

However, it is not fully compatible with EMACS.  One difference that
may cause some users trouble is that certain commands which, in EMACS,
set the mark, and thus push on the mark PDL, do not affect the ZWEI
point PDL.  In particular, the "Yank" and "Insert Buffer" commands in
ZWEI set the mark to the other end of the inserted region, but do not
affect the point PDL.  In EMACS, you can get to the other side of
the inserted text either by swapping point and mark (with c-X c-X)
or by popping the mark PDL (c-Space or c-@); in ZWEI only the
former works.

Another difference between EMACS and ZWEI is that in ZWEI, the region
either "exists" or "does not exist"; there is no such concept in EMACS.
When the region exists, it is underlined; when it doesn't exist, the
underlining goes away.  The main point of this is to keep the
underlining from being visually distracting when the user is not
concerned about the region.  It also keeps region-munging commands
(such as Uppercase Region or Fill Region) from happening unexpectedly
if your fingers slip.  Usually the region is created when you set the
mark, and usually it goes away when you give any command that does
something more complex than moving the point; the mouse can also create
the region.  But even when the region does not exist, the mark is still
there, albeit invisibly as in EMACS.  If you want to turn on the region
without affecting the current position of mark, you can use c-X c-X,
which is what some people usually use in EMACS to find out where the
mark is.

Also, in a few special cases, some commands that refer to the region
will still work even if the region does not exist.  In particular, the
Kill Region (c-W) command will work immediately following a yanking
command (such as c-Y), so that you can kill what you just yanked if you
don't like it.