Subject: bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs).

From: Keith David Bershatsky <[email-masked]>
Date: Tue, 28 Aug 2018 23:39:25 -0700

Proof concept patch version 014.  Changes include, but are not limited to:

-  Crosshairs now attempts to deal with variable pitch and nonstandard width characters.  This is accomplished by permitting the vertical ruler to intersect a character anywhere along the X axis (vertically aligned with the left of point).  The horizontal ruler now also plays nicer with nonstandard width characters.

-  Debugging messages to stderr are turned on/off with:  M-x mc-stderr.

-  Bug fixes (elimination of an infinite loop; drawing multiple fake cursors only if they are within the bounds of the visible window; miscellaneous others...).

-  Reduced footprint of revisions to core Emacs code, which is now possible by using a few new window pointers:  w->mc.[red, green, blue, fx, fy, h].

INSTALLATION:

1.  Download a current version of Emacs master branch.

2.  Reset the repository to 07/07/2018:  git reset --hard 98463bed07ecc9057094928ffdc2321eaaf3ab52

3.  Apply the attached patch from the root repository directory.

4.  Build a GUI version of Emacs:  X11, NS, or Windows.

5.  To try out built-in fake cursors with Magnar Sveen's library (multiple-cursors), install that package first.

    (progn
      (require 'package)
      (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
      (package-initialize)
      (package-refresh-contents)
      (package-install 'multiple-cursors))

6.  Load or evaluate the contents of crosshairs.el (attached), which includes code modifying a couple of functions used by Magnar Sveen's library.

7.  To try out the crosshairs feature, open a simple buffer (nothing fancy, just code or text) and type:  M-x +-mode

8.  To see an example of crosshairs playing nicely with tab stretches, open up something like simple.el and type:  M-x +-mode.

9.  To see an example of a variety of built-in cursor styles and widths, type:  M-x mc-test

This is still a work in progress ...