[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs).
From: |
Keith David Bershatsky |
Subject: |
bug#17684: #22873 (multiple fake cursors); and, #17684 (crosshairs). |
Date: |
Sat, 20 Apr 2019 22:15:47 -0700 |
VERSION: 019.000 [04/20/2019]
CHANGELOG:
- Fake cursors no longer use Lisp_Object for cache management and to temporarily
store RGB color data. Caches and RGB color data are now managed by structs.
Special thanks to Alex Gramiak and Eli Zaretskii for their generous assistance
on the Emacs Devel mailing list with those related issues:
http://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00421.html
http://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00762.html
- A temporary cache of fake cursors is no longer needed to manage left/right
overwritten characters.
- As of the last patch (018.000), there has no longer been a need to force a
frame update when drawing/erasing fake cursors. As such, the code for forcing
a frame update has been removed in this new patch (019.000).
- Eliminated a few window pointers previously used to store RGB color data and
also the screen relative x coordinate of the fill column. Lisp_Object related
widow pointers have also been removed in light of new cache management
(above).
- The BOX_CURSOR variant known as a framed box cursor is now only available when
using the multiple fake cursor related features.
SETUP:
Step 1: git clone -b master git://git.sv.gnu.org/emacs.git
Step 2: In the new emacs folder, go back to an Emacs version from 04/08/2019:
git reset --hard a038df77de7b1aa2d73a6478493b8838b59e4982
Step 3: From within the new emacs folder created in Step 1, apply the patch:
git apply /path/to/the/patch.diff
Step 4: ./autogen.sh
Step 5: ./configure ... [your custom options]
Step 6: make
Step 7: make install
USAGE:
- For a minimal working example of built-in fake cursors, type: M-x mc-test
;;; TURN ON FAKE CURSORS (buffer position, cursor-type, cursor color):
(setq mc-conf '((1 "hbar" "magenta")
(2 "bar" "purple")
(3 "box" "#00FF00")
(4 "hollow" "#0000FF")
(5 ("hbar" 3) [1.0 0.0 1.0])
(6 ("bar" 3) [0.0 1.0 1.0])
(7 "framed" "OrangeRed"))))
;;; TURN OFF FAKE CURSORS:
(setq mc-conf nil)
- To try out the crosshairs feature, type: M-x +-mode
- To try out built-in fake cursors with Magnar Sveen's multiple-cursors package,
install that package first. [If the multiple-cursors package is installed, an
eval-after-load "multiple-cursors-core" statement within `crosshairs.el` will
redefine a couple of functions and set up a few keyboard shortcuts.] If the
multiple-cursors package by Magnar Sveen is not already installed, then here
are two easy ways to install that package:
Type: M-x mc-install
OR, evaluate the following snippet:
(progn
(require 'package)
(add-to-list 'package-archives '("melpa" .
"http://melpa.milkbox.net/packages/") t)
(package-initialize)
(package-refresh-contents)
(package-install 'multiple-cursors))
TODO:
- Do further testing to make sure that garbage collection is now under control.
Search for any remaining Lisp_Object that can be eliminated and handled purely
in C.
- *GNU Emacs* welcome screen: A portion of the hollow box cursor surrounding
the
Emacs logo image is not always being redrawn when moving the cursor over lines
underneath the image. This is happening on at least 2 of the 3 relevant
ports.
- When using the multiple fake cursors feature, a fake cursor does not show up
at
zv_p.
- Deal with left/right overwritten glyphs in the w32 and X ports of Emacs.
- Reduce the removal of fake cursors to the bare minimum when scrolling the text
on the glass directly, and whenever `update_window' is called.
- When an idle-timer fires and point is at the end of a horizontally scrolled
line in a narrow window, the temporary horizontal scroll is canceled. Create
an minimal working example and file a bug report.
- There is a bug affecting the recorded `w->mc.lnum_pixel_width` that is
observable when not running under gdb, but disappears when running under gdb.
While viewing a folded org-mode buffer, the non-gdb instance had a visible
line number pixel-width of 44, but Emacs treated it as fluctuating between
44 and 55 as the cursor was moved to the end of line. In the gdb instance,
the visible line number pixel width was 55 with no fluctuation under the same
conditions as the non-gdb instance. This appears to be a different bug than
bug#32177 (current line number shifts one column to the left) because the line
number of the current line does not shift left, and changing the bidi settings
did not correct the issue.
- The current test for `auto_hscroll_mode_p' only looks for `current_line` and
all five related tests are based upon that assumption, which may not be true.
- Multiple Cursors: If point is in the middle of a composite character, then
select a fully composed character so that the fake cursor is visible.
- Implement functionality similar to the Lisp multiple-cursors by Magnar Sveen.
- Follow up with the Emacs team re bug#32177; i.e., (Current line number shifts
one column to the left.)
- Follow up with the Emacs team re bug#32060; i.e., Horizontal Scrolling
(Current Line): Wrong line gets h-scrolled.
- Determine if bug #28936 needs to be fixed and help the Emacs team re same.
2019_04_20__22_08_31_450.diff
Description: application/diff