From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22873: Can we support multiple Cursors? Date: Fri, 04 Mar 2016 15:16:56 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1457133502 4038 80.91.229.3 (4 Mar 2016 23:18:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 4 Mar 2016 23:18:22 +0000 (UTC) Cc: John Wiegley , 22873@debbugs.gnu.org, Richard Stallman To: Marcin Borkowski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 05 00:18:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1abyz4-00018z-Al for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Mar 2016 00:18:10 +0100 Original-Received: from localhost ([::1]:43968 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abyz3-00010W-Nm for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Mar 2016 18:18:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46119) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abyyz-0000yr-C4 for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 18:18:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abyyw-000301-4p for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 18:18:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abyyw-0002zx-0x for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 18:18:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1abyyv-0005Jh-Ou for bug-gnu-emacs@gnu.org; Fri, 04 Mar 2016 18:18:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Mar 2016 23:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22873 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22873-submit@debbugs.gnu.org id=B22873.145713342420372 (code B ref 22873); Fri, 04 Mar 2016 23:18:01 +0000 Original-Received: (at 22873) by debbugs.gnu.org; 4 Mar 2016 23:17:04 +0000 Original-Received: from localhost ([127.0.0.1]:34172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abyy0-0005IV-JI for submit@debbugs.gnu.org; Fri, 04 Mar 2016 18:17:04 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:47218) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abyxz-0005I0-Hy for 22873@debbugs.gnu.org; Fri, 04 Mar 2016 18:17:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com; s=default; h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date; bh=lUOWp2Top3MXMSmBNwLQ0ZZmEOT1vYNh/sNT1Xw13sU=; b=CkfId+YKAxCHHKNLXXSyg6p7vWUiytNGJ7qIOJofwJVA+MQiiDzquC9rV2sGplFzt9StOl1dH3MQGFseahQReOSq4paWGHnHjhF6S567XOnTomgKytfq4cTgzJamLtp+; Original-Received: from rrcs-74-62-211-60.west.biz.rr.com ([74.62.211.60]:49450 helo=MBP.local.localhost) by cobb.liquidweb.com with esmtp (Exim 4.82) (envelope-from ) id 1abyxs-0002j1-8R; Fri, 04 Mar 2016 18:16:56 -0500 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cobb.liquidweb.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-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry: -unknown-@lawlist.com|lawlist.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:114435 Archived-At: I see this feature request as having two (2) distinct, yet related components. The fake cursors being the first component that will operate similar to overlays, and are thus fairly innocuous as they won't have any real affect on where point is located after redisplay finishes. The second component, however, is the functionality that can be found in Magnar Sveen's library and also is present in a popular commercial editor known as Sublime Text. I enjoy using the multiple cursors library written by Magnar Sveen, but often find myself taking advantage of the wait times to pour myself a cup of coffee while making edits with a few hundred fake cursors in a large buffer. E.g., I will type the word I want inserted or tap the arrow key a few times in a particular direction and then walk away from the computer or surf the web while Emacs does its thing. I often have to use `M-x replace-string` when dealing with large numbers of edits instead of using my preferred choice of multiple cursors. Admittedly, I am using a slightly older customized version of Mr. Sveen's library -- but I don't think the basic functionality has changed all that much since I first started using it. I am not a programmer by trade, but I assume there could be some significant speed increases by having multiple cursor abilities baked into the C code base of the Emacs internals. I don't think (based on my limited programming knowledge) that all of the cursor-types are presently available as overlays. I need the left bar cursor so that I can draw my solid vertical line that tracks the cursor position, and so that is what motivated me to write a sample draft patch to the C internals. My draft is progressing nicely, but it is slow to perfect because I am learning a few of the basics to the C language as I go. I'll post to #22873 a revised draft of the first component (i.e., just fake cursors) in the next few days depending upon how many road blocks I encounter. I've set up a simple cache of x/y/hpos/vpos so that recalculation is not necessary when the list of fake cursors doesn't change -- cursors are redrawn more than once per command loop depending upon what ha ppens, e.g., with the mouse, etc. And a user may not wish to change the positions of fake cursors every command loop, so the cache is helpful. It may be a very long time, however, before I have enough basic skills to be able to implement some of the functionality of the second component. I understand the implementation of feature 22873 is only a discussion at this point in time. The beauty of Emacs, however, is that it's open source and I can make modifications to a custom build for my in-house use. :) Keith ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; At Thu, 03 Mar 2016 07:54:17 +0100, Marcin Borkowski wrote: > > > * * * > > What would be the added value of having that built-in vs. having it on > M?elpa? > > Best, > > -- > Marcin Borkowski