GNU bug report logs - #22873
25.1.50; Feature Request -- Multiple Cursors (built-in support)

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Tue, 1 Mar 2016 18:46:01 UTC

Severity: wishlist

Found in version 25.1.50

Full log


View this message in rfc822 format

From: Keith David Bershatsky <esq <at> lawlist.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: jwiegley <at> gmail.com, mbork <at> mbork.pl, rms <at> gnu.org, 22873 <at> debbugs.gnu.org
Subject: bug#22873: Can we support multiple Cursors?
Date: Thu, 10 Mar 2016 23:18:41 -0800
[Message part 1 (text/plain, inline)]
Attached is the third draft, multiple_cursors_003.diff, which applies to the master branch as of commit "ea626c72e590aa7a45fd26df42240854e4225cef" on March 10, 2015.

Different colors for each fake cursor are now supported on Emacs for Windows (XP SP-3) and OSX (10.6.8).

The next phase will be to separate the custom feature called `window-start-end-hook` from this new fake cursor feature 22873.  Currently, I am using the existence of a definitive window-start and window-end derived from the `window-start-end-hook` as a guide and condition precedent to placing the fake cursors.  Given that fake cursors are placed late in the stage of the redisplay process, I suspect that I can rely on other methods to extract the correct window-start and window-end.

The other unrelated features that were present in my first couple of drafts have been removed from this third draft.  The fake cursors feature works as follows -- to erase everything or change anything, just modify the `mc-list':

(defun mc-test (&optional list)
"Draw fake cursors at all POS defined in the `mc-list'.
Color vector is LSL (The Linden Scripting Language), rather than standard RGB.
`nsterm.m' uses `NSColor', which works well with LSL.  `w32term.c' uses
`PALETTERGB' or `RGB', and the conversion from LSL is done internally by
multiplying each element of the LSL color vector by 255."
(interactive)
  (setq mc-list '(
    (3 "hbar" [1.0 0.0 0.0])
    (4 "bar" [0.0 1.0 0.0])
    (5 "box" [0.0 0.0 1.0])
    (6 "hollow" [0.8 0.4 0.2])
    (7 ("hbar" 3) [1.0 0.0 1.0])
    (8 ("bar" 3) [0.0 1.0 1.0]))))

(global-set-key [f1] 'mc-test)

[multiple_cursors_003.diff (application/diff, attachment)]

This bug report was last modified 4 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.