all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: mbork@mbork.pl, 22873@debbugs.gnu.org, johnw@gnu.org,
	akioburns@icloud.com, 17684@debbugs.gnu.org, rms@gnu.org
Subject: bug#17684: bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column).
Date: Wed, 30 Sep 2020 20:54:14 -0700	[thread overview]
Message-ID: <3F49C53D-BDFE-4C12-A7B5-7ECD599C41E0@lawlist.com> (raw)
In-Reply-To: <87h7retzv1.fsf@gnus.org>

Thank you, Lars, for having a look at feature requests 22873 and 17684.  The crosshairs feature to track the cursor position (17684) was the motivation for implementing the framework to create multiple fake cursors (22873); i.e., the crosshairs, and visible fill-column indicator that can intersect through characters at any pixel X coordinate are, are all drawn with fake cursors.  The draft proof concept works for GUI versions of Emacs on X11, Windows and OSX.  I haven't done anything much since 07/14/2019 except fix some bugs, some important, some minor.  Drew Adams contacted me several months ago and requested that I change `crosshairs.el` to anything else since he has a crosshairs library on wiki, and he didn't want any potential confusion.  There is nothing better I could think of as a name for the 17684 Lisp library and since crosshairs goes against the wishes of Drew, I just went ahead and changed the name to +-mode.el, because the plus sign looks like a crosshairs, and I use the plus sign as the mode-line minor-mode lighter.

22873 (multiple cursors) is presently just a framework to generate fake cursors anywhere on the window-body.  Nothing has been written yet to perform any type of user command/function action at each location of fake cursors.  I have been using 22873 to replace the visual overlays used by Magnar Sveen in his Lisp implementation of multiple-cursors; i.e., instead of visible overlays, Emacs generates a fake cursor at each location (which can change cursor colors and cursor shapes, if so desired, such as yellow for an even column and red for an odd column).

Emacs was set up by the forefathers with some window pointers to temporarily save values, such as the coordinates of the real cursor.  I felt this was somewhat confusing and it seemed to me like an "afterthought" (an after the fact implementation) to avoid the need to add new arguments to existing functions in order to pass the values needed.  Without modifying the existing system as to the real cursor, I did away with all that as it applies to fake cursors by creating additional arguments in the relevant new functions to pass the values where needed.

The matrix of multiple fake cursors is somewhat complex, at least for me, and was implemented with the generous help of Alex Gramiak on the Emacs Devel mailing list; including, but not limited to dynamic memory management for the caches of fake cursors.  This did away with all of the problems I had previously encountered with a slow-down due to constant garbage collection for having too many Lisp Objects.  Based upon the help provided by Alex G., features 17684/22873 are now really pretty darn fast in my opinion.

Eli Z. has been very kind and generous with his time over the years to help me through most of the hard issues that I encountered, and with his help, the Emacs Devel team even fixed a few bugs in the master along the way (which I helped discover while working on 17684/22873).

In the comments at the outset of the most recent post to 17684/22873, there is a "todo list" and also some notes regarding how these features work.

In order to reduce as much as possible any modifications to existing functions in the core of Emacs, I copied a lot of those functions functions, changed their names, added additional arguments as needed (supra), and modified some of the body as needed.

Others on the Emacs Devel team may undoubtedly have an entirely different viewpoint / approach regarding the implementation of multiple fake cursors, but it was something that I felt I could not live without, so I went ahead and created something that I have been using on a daily basis for the past couple of years (perhaps a little longer).  I also use Magnar's multiple-cursors library several times a day, and feature 22873 replaces his visible overlays with fake cursors.

I do not know what would be needed to bring 17684 / 22873 current from 07/14/2019 (master branch) to the present date.  The last time I brought 17684/22873 forward to the then current date of 07/14/2019, I encountered one or more bugs in the master branch and it took a few weeks to resolve -- which fix(es) would have been impossible without the help of Eli Z. and a few others in the Emacs Devel.  If, by chance, I encounter undiscovered bugs in the master branch that pose significant obstacles to moving forward to the current commit date, then it could take several weeks; it just depends ...  This stuff is pretty complex for me, and I would even have to study what I previously did to refresh my memory again regarding how everything works as it relates to 17684/22873.

Recently, things at my day job have picked back up again and I haven't had a whole lot of free time lately.

There are links to some screenshots of 17684/22873 and a few videos of those features running on the different OS platforms if anyone would like to take a look -- the links are in the most recent post to 17684/22873.

Thanks,

Keith

On Sep 30, 2020, at 8:00 PM, Lars Ingebrigtsen wrote:

> Keith David Bershatsky <esq@lawlist.com> writes:
> 
>> VERSION:  022.008 [05/02/2020]
>> 
>> CHANGELOG:
>> 
>> +(defgroup +-mode nil
>> +  "Faces for the vertical ruler."
>> +  :group 'convenience)
> 
> This is a huge patch set, and I have not tried it.  It seems like the
> general consensus is that, yes, we would like to have multiple cursors,
> but I'm not sure what this has to do with crosshairs?  I've just lightly
> skimmed this thread, though...
> 
> Anyway, I'm not sure what the status is here.  The naming standard
> doesn't seem to follow Emacs convention -- there's a mode called
> `+-mode', for instance, which would have to be renamed...
> 
> Keith, is this still a work in progress, or is it something you think is
> ready to go, and would like a code review on?
> 
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>   bloggy blog: http://lars.ingebrigtsen.no






  reply	other threads:[~2020-10-01  3:54 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 20:36 bug#17684: 24.4.50; Feature Request -- Vertical Lines to the Left of and Through Characters Keith David Bershatsky
2018-07-09  5:28 ` bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs) Keith David Bershatsky
2018-11-11  3:36 ` Keith David Bershatsky
2018-11-11 16:51 ` Keith David Bershatsky
2018-11-21  4:53 ` bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column) Keith David Bershatsky
2018-12-14  7:11 ` Keith David Bershatsky
2019-04-09  4:03 ` bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs) Keith David Bershatsky
2019-04-21  5:15 ` Keith David Bershatsky
2019-04-29  1:21 ` Keith David Bershatsky
2019-06-08 23:44 ` Keith David Bershatsky
2019-06-16  8:07 ` Keith David Bershatsky
2019-06-24  2:25 ` Keith David Bershatsky
2019-06-30  5:42 ` Keith David Bershatsky
2019-07-31 19:39 ` Keith David Bershatsky
2019-10-18  1:12 ` bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column) Keith David Bershatsky
2019-11-18  6:58 ` Keith David Bershatsky
2020-01-27  7:39 ` Keith David Bershatsky
2020-05-02 20:50 ` Keith David Bershatsky
2020-10-01  3:00   ` bug#17684: bug#22873: " Lars Ingebrigtsen
2020-10-01  3:54     ` Keith David Bershatsky [this message]
2020-10-01 16:21       ` Lars Ingebrigtsen
2020-10-01 17:00         ` Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2016-03-01 18:44 bug#22873: 25.1.50; Feature Request -- Multiple Cursors (built-in support) Keith David Bershatsky
2016-03-03  6:30 ` bug#22873: Can we support multiple Cursors? John Wiegley
2016-03-03  6:30 ` John Wiegley
2016-03-03  6:54   ` bug#22873: " Marcin Borkowski
2016-03-03  6:54   ` Marcin Borkowski
2016-03-03 11:20     ` bug#22873: " Richard Stallman
2016-03-03 11:20     ` Richard Stallman
2016-03-03 15:05       ` Marcin Borkowski
2016-03-04  9:19         ` Richard Stallman
2016-03-04  9:19         ` Richard Stallman
2016-03-04 14:59           ` Stefan Monnier
2016-03-04 22:18             ` Magnar Sveen
2016-03-05  2:16               ` Stefan Monnier
2016-03-05 13:00                 ` Richard Stallman
2016-03-06  4:47                 ` John Wiegley
2016-03-06 20:30                 ` Clément Pit--Claudel
2016-03-08  4:53                   ` Stefan Monnier
2016-03-06 20:33               ` Clément Pit--Claudel
2016-03-08  4:55                 ` Stefan Monnier
2016-03-05 12:58             ` Richard Stallman
2016-03-03 15:05       ` Marcin Borkowski
2016-03-04 23:16 ` Keith David Bershatsky
2016-03-05  6:59   ` Marcin Borkowski
2016-03-09  6:50   ` Keith David Bershatsky
2016-03-09  6:27 ` Keith David Bershatsky
2016-03-09  6:45   ` Keith David Bershatsky
2016-03-09 16:03   ` Eli Zaretskii
2016-03-09 18:30 ` Keith David Bershatsky
2016-03-11  7:18 ` Keith David Bershatsky
2016-03-14 18:35 ` Keith David Bershatsky
2016-03-14 18:49   ` Eli Zaretskii
2016-03-14 22:38 ` Keith David Bershatsky
2016-03-16  8:00 ` Keith David Bershatsky
2016-03-18  4:00 ` Keith David Bershatsky
2016-03-26 23:58   ` John Wiegley
2016-03-29  3:45 ` Keith David Bershatsky
2016-03-29 14:58   ` Eli Zaretskii
2016-03-29 17:26 ` Keith David Bershatsky
2017-06-25 22:09 ` Keith David Bershatsky
2017-07-30 17:39 ` Keith David Bershatsky
2017-08-11  0:00 ` bug#22873: Can we support multiple cursors? Keith David Bershatsky
2017-08-13 18:19 ` Keith David Bershatsky
2017-08-13 18:36   ` Eli Zaretskii
2017-08-14  3:20 ` Keith David Bershatsky
2017-08-14 15:01   ` Eli Zaretskii
2017-08-14 20:35 ` Keith David Bershatsky
2017-12-27 17:13 ` bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs) Keith David Bershatsky
2017-12-27 23:55   ` John Wiegley
2017-12-28  1:20 ` bug#22873: #22873 (multiple fake cursors) Keith David Bershatsky
2017-12-28  1:26 ` Keith David Bershatsky
2018-07-17 19:09 ` bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs) Keith David Bershatsky
2018-08-29  6:39 ` Keith David Bershatsky
2019-05-03  0:48 ` Keith David Bershatsky
2019-05-06 18:39 ` Keith David Bershatsky
2019-05-28  8:31 ` Keith David Bershatsky
2019-06-02  7:29 ` Keith David Bershatsky
2019-07-16 19:28 ` Keith David Bershatsky
2019-07-23  6:01 ` Keith David Bershatsky
2019-08-23  5:19 ` Keith David Bershatsky
2019-10-17 21:08 ` bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column) Keith David Bershatsky
2020-03-04  9:03 ` Keith David Bershatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F49C53D-BDFE-4C12-A7B5-7ECD599C41E0@lawlist.com \
    --to=esq@lawlist.com \
    --cc=17684@debbugs.gnu.org \
    --cc=22873@debbugs.gnu.org \
    --cc=akioburns@icloud.com \
    --cc=johnw@gnu.org \
    --cc=larsi@gnus.org \
    --cc=mbork@mbork.pl \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.