From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#17684: bug#22873: #22873 (multiple fake cursors); and, #17684 (crosshairs / fill-column). Date: Wed, 30 Sep 2020 20:54:14 -0700 Message-ID: <3F49C53D-BDFE-4C12-A7B5-7ECD599C41E0@lawlist.com> References: <87h7retzv1.fsf@gnus.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8723"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mbork@mbork.pl, 22873@debbugs.gnu.org, johnw@gnu.org, akioburns@icloud.com, 17684@debbugs.gnu.org, rms@gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 01 05:55:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kNpgU-00027F-Qj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Oct 2020 05:55:11 +0200 Original-Received: from localhost ([::1]:55698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNpgT-0000fY-CE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Sep 2020 23:55:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNpgM-0000f6-By for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 23:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kNpgM-0003LM-22 for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 23:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kNpgL-0007KM-Vl for bug-gnu-emacs@gnu.org; Wed, 30 Sep 2020 23:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Oct 2020 03:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17684 X-GNU-PR-Package: emacs Original-Received: via spool by 17684-submit@debbugs.gnu.org id=B17684.160152446628119 (code B ref 17684); Thu, 01 Oct 2020 03:55:01 +0000 Original-Received: (at 17684) by debbugs.gnu.org; 1 Oct 2020 03:54:26 +0000 Original-Received: from localhost ([127.0.0.1]:33752 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNpfm-0007JT-59 for submit@debbugs.gnu.org; Wed, 30 Sep 2020 23:54:26 -0400 Original-Received: from gateway23.websitewelcome.com ([192.185.50.108]:41182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kNpfd-0007Iv-Lh for 17684@debbugs.gnu.org; Wed, 30 Sep 2020 23:54:21 -0400 Original-Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 1B8FBAE86 for <17684@debbugs.gnu.org>; Wed, 30 Sep 2020 22:54:17 -0500 (CDT) Original-Received: from gator3053.hostgator.com ([50.87.144.69]) by cmsmtp with SMTP id Npfck9o11LFNkNpfckGgY4; Wed, 30 Sep 2020 22:54:17 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com ; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Content-Type:Mime-Version:Subject:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=jbIIoEJSbDYKhpM+ynLbHB4jKAUb+/10AApiGH8bqRA=; b=W2uDXmE+btzWgj1GCkse0tWZlH bLXVTlEeCfeUm1JDetwpl4ZkJbqXBlGWFmz+xvdQUBdAfrrIJj/CUltyMDTNC+XhGLmecRNPUtKNT 5ioVcDhZ2f+3X0unEpOGLChSX6xQIoxGstd5kroIcQZL2rh5+HU+HP3q91nHsdoOe01CPYjXxGfuw TO/nZrjaWR46Oc7J9v4DduSwgH9YOZ5iv5WsJYm2cCqUFZIVijnQCjyRVK+SWfeW1I5vueGWA9LYD svgdcgq+m53JQGhGHuPFiG8I/rFZasbrbDHbCIHyMcMbByfK4belVlGpxuS5awQM3ZmaMUepC9LtI J3lgfldg==; Original-Received: from cpe-45-48-245-70.socal.res.rr.com ([45.48.245.70]:55721 helo=[192.168.0.22]) by gator3053.hostgator.com with esmtpsa (TLS1) tls TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (Exim 4.93) (envelope-from ) id 1kNpfb-0015o1-Tu; Wed, 30 Sep 2020 22:54:16 -0500 In-Reply-To: <87h7retzv1.fsf@gnus.org> X-Mailer: Apple Mail (2.1084) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3053.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lawlist.com X-BWhitelist: no X-Source-IP: 45.48.245.70 X-Source-L: No X-Exim-ID: 1kNpfb-0015o1-Tu X-Source-Sender: cpe-45-48-245-70.socal.res.rr.com ([192.168.0.22]) [45.48.245.70]:55721 X-Source-Auth: lawlist X-Email-Count: 7 X-Source-Cap: bGF3bGlzdDtsYXdsaXN0O2dhdG9yMzA1My5ob3N0Z2F0b3IuY29t X-Local-Domain: yes X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189467 Archived-At: 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 writes: >=20 >> VERSION: 022.008 [05/02/2020] >>=20 >> CHANGELOG: >>=20 >> +(defgroup +-mode nil >> + "Faces for the vertical ruler." >> + :group 'convenience) >=20 > 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... >=20 > 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... >=20 > 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? >=20 > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no