all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Barzilay <eli@barzilay.org>
To: 21731@debbugs.gnu.org
Subject: bug#21731: 24.5; Bug with `transient-mark-mode' wrt `cua-mode'
Date: Thu, 22 Oct 2015 01:22:04 -0400	[thread overview]
Message-ID: <22056.29308.347026.83990@lambda.ccs.neu.edu> (raw)

This is a bug that I ran into with 24.5.1:

* Run emacs -Q

* Use shifted arrow keys to make some transient selection (on by
  default, so no need to do any customizations).

* Use C-x b to switch to another buffer

* Use unshifted arrows to move in this buffer

* C-x b back into the first buffer

* Now unshifted arrow movements continue to change the selection, as
  if it was made with C-SPC

FWIW#1, it looks like this bug existed for a while -- I see it with
24.3.1 too.  The reason I didn't see it then is that (IIUC) `cua-mode'
did its own thing (correctly), and it looks like this was dropped and
the functionality from simple.el is used instead.

This is why I qualified this as "wrt cua-mode": the buggy behavior
might be considered correct for people who have used it before and
expect it to happen.  (I doubt this, but that's subjective.)

The reason for this was easy to track: `transient-mark-mode' is a
*global* variable.  After shifted movement, it gets a value of
(only . t), and shifted movements turn it back to t even if they
happen in a different buffer.  (I don't see off-hand any quick way to
fix it, but if anyone has an idea, I'd be happy to know about it.)

The fix should involve some buffer-local version of
`transient-mark-mode', but since it's also used globally as a mode,
this might require a new variable.

If the current behavior is intentional, then this becomes harder to
fix, since it would require having both behaviors available.  It would
still be a bug since it changes functionality for people who use
cua-mode -- which would enable this imaginary extension.

-- 
                    ((x=>x(x))(x=>x(x)))                   Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!





             reply	other threads:[~2015-10-22  5:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22  5:22 Eli Barzilay [this message]
     [not found] ` <handler.21731.B.14454914222534.ack@debbugs.gnu.org>
2015-10-22  5:26   ` bug#21731: Acknowledgement (24.5; Bug with `transient-mark-mode' wrt `cua-mode') Eli Barzilay
2015-10-22 14:51 ` bug#21731: 24.5; Bug with `transient-mark-mode' wrt `cua-mode' Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22056.29308.347026.83990@lambda.ccs.neu.edu \
    --to=eli@barzilay.org \
    --cc=21731@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.