[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposal to change cursor appearance to indicate region activation
From: |
Kelly Dean |
Subject: |
Proposal to change cursor appearance to indicate region activation |
Date: |
Fri, 19 Apr 2013 19:54:38 -0700 (PDT) |
By default in Emacs, when the region is active but empty, there's no visual
indication of this status. Neither is there indication of the active region if
point is one less than mark and blink-cursor-mode is off. Also, if point is
greater than mark, the active region is highlighted, but the block cursor does
an inverse-video highlight of the character following the region, which
(speaking from experience) an Emacs newbie finds distracting, since it seems to
indicate that that character is also part of the region, even though it
actually isn't. Adding to the confusion, the inverse-video highlighted
character actually is part of the region in the case that point is less than
mark. Setting the cursor type to bar when the region is active solves all those
problems, and I recommend it as the default for Emacs.
(add-hook 'deactivate-mark-hook (lambda () (setq cursor-type t)))
(add-hook 'activate-mark-hook (lambda () (setq cursor-type 'bar)))
Simply setting the cursor type permanently to bar would solve most of the
problems, but still wouldn't indicate an active empty region. And a permanent
bar cursor makes it hard to find the cursor on screen if blink mode is off. So
I recommend keeping the current default of a block cursor when the region isn't
active.
Stephan said (in comment about bug 14225) that if a dynamic cursor is the
default, then people will probably start experiencing bugs because of it. For
me it's only triggered bugs 13027, 14225, and maybe 13169, which are all fixed,
and when I restart Emacs I get a bar cursor in each buffer (reloaded using
desktop mode) until I do keyboard-quit, but it doesn't bother me much since I
don't restart Emacs very often.
- Proposal to change cursor appearance to indicate region activation,
Kelly Dean <=