From: Stephen Berman <stephen.berman@gmx.net>
To: 38431@debbugs.gnu.org
Subject: bug#38431: 27.0.50; mouse-drag-region-rectangle needs transient-mark-mode
Date: Fri, 29 Nov 2019 22:13:36 +0100 [thread overview]
Message-ID: <87v9r21j3z.fsf@gmx.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
After updating from master I wanted to try the new
mouse-drag-region-rectangle command but it didn't work with my init file,
and I found the reason was I have transient-mark-mode customized to
nil. To reproduce:
0. emacs -Q (transient-mark-mode enabled)
1. Type `C-M-mouse-1', drag the mouse and a retangle gets selected.
2. M-x transient-mark-mode (now disabled)
3. Type `C-M-mouse-1', drag the mouse and no retangle gets selected.
I found no indication in NEWS, the Emacs manual or the doc string of
mouse-drag-region-rectangle that it is not supposed to work with
transient-mark-mode disabled, so I assume this is a bug. This patch
makes it work with t-m-m disabled:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mouse-drag-region-rectangle patch --]
[-- Type: text/x-patch, Size: 450 bytes --]
diff --git a/lisp/mouse.el b/lisp/mouse.el
index f076e90bd9..fd0ef2a360 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1999,6 +1999,8 @@ mouse-drag-region-rectangle
(unless dragged
;; This is actually a drag.
(setq dragged t)
+ (unless transient-mark-mode
+ (setq transient-mark-mode 'lambda))
(mouse-minibuffer-check start-event)
(deactivate-mark)
(posn-set-point start-pos)
[-- Attachment #3: Type: text/plain, Size: 1279 bytes --]
However, this is not the right, or at least the complete, fix, because
it has some bad side-effects: after disabling t-m-m and then selecting a
rectangle with the mouse, now typing `M-x transient-mark-mode' still
says it is disabled; after typing it again, it is now enabled, but
typing C-SPC and then moving point does not show an active region; only
after typing C-SPC C-SPC and then anything (e.g. C-g) and then again
typing C-SPC and moving point is an active region shown. So a better or
more complete fix is needed.
In GNU Emacs 27.0.50 (build 26, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0)
of 2019-11-29 built on strobe-lfs84
Repository revision: b2790db049da98b541d07bac21ca7d7c220d3be0
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Linux From Scratch
Configured using:
'configure --with-cairo 'CFLAGS=-Og -g3'
PKG_CONFIG_PATH=/opt/qt5/lib/pkgconfig'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2
GMP
Important settings:
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
next reply other threads:[~2019-11-29 21:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 21:13 Stephen Berman [this message]
2019-12-01 17:44 ` bug#38431: 27.0.50; mouse-drag-region-rectangle needs transient-mark-mode Mattias Engdegård
2019-12-01 20:42 ` Stephen Berman
2019-12-01 20:46 ` Mattias Engdegård
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=87v9r21j3z.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=38431@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.