GNU bug report logs -
#2760
CUA-like stuff spuriously enables transient-mark-mode.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Mon, 23 Mar 2009 22:45:04 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Tue, 24 Mar 2009 15:49:37 +0000
with message-id <20090324154937.GB4657 <at> muc.de>
and subject line Re: bug#2760: Acknowledgement (CUA-like stuff spuriously enables transient-mark-mode.)
has caused the Emacs bug report #2760,
regarding CUA-like stuff spuriously enables transient-mark-mode.
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact help-debbugs <at> gnu.org
immediately.)
--
2760: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2760
Emacs Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi, Richard, Eli and Emacs!
Start the CVS head "emacs -Q", and evaluate this:
(global-set-key [ &\C-\M-\S-m ] 'forward-char)
(transient-mark-mode -1)
In some buffer, invoke 'forward-char by the above binding. This enables
transient-mark-mode as a side effect. This shouldn't happen. It happens
both in a Linux Virtual terminal (with the requisite enhancements to the
keyboard handling) and in X-Windows.
ANALYSIS:
---------
The "^" in the interactive string causes `handle-shift-selection' to be
invoked by the command loop. The function and friends abuse the user
option variable `transient-mark-mode' by additionally storing some sort
of state in it. h-s-s writes the value '(only) into the variable
transient-mark-mode, thus enabling the mode. A sensible fix would surely
involve leaving `transient-mark-mode' severely alone (only the user
should set this) and creating another variable (or several) to hold the
state currently mashed into t-m-m.
COMMENT:
--------
It is now no longer true that "But Emacs does not assign meanings to keys
directly" (Emacs manual, page "Commands") - Emacs directly assigns a
meaning to the shift key. This is surely a Bad Thing.
Why, why, why is this thing implemented by hard-coding in the command
loop, where it interferes with users' ability to chose key bindings?
Surely this feature with the shift key should have been implemented by
defining defuns such as `forward-char-with-marking', and putting these
commands in some suitable keymap? OK, it's more work, but not _that_
much more.
It's practically 100% certain that somebody, somewhere, will want to use
the hyper- or alt- keys instead of <shift> to get this visible region
feature, or possibly might want to use separate bindings entirely.
It's near 100% certain that somebody, somewhere, perhaps with a name like
Xah Lee, will want to use C-f as "find" (i.e. bind it to
`isearch-forward') and use C-S-f for `forward-char'.
--
Alan Mackenzie (Nuremberg, Germany).
[Message part 3 (message/rfc822, inline)]
This wasn't a bug.
On Mon, Mar 23, 2009 at 10:45:04PM +0000, Emacs bug Tracking System wrote:
> Thank you for filing a new bug report with Emacs.
> --
> 2760: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=2760
> Emacs Bug Tracking System
> Contact help-debbugs <at> gnu.org with problems
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 16 years and 64 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.