GNU bug report logs - #17140
24.4.50; Modified mouse-click events are not translated to unmodified if unbound

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Dominic Jänichen <d.newsgroups@HIDDEN>; merged with #23732; dated Sat, 29 Mar 2014 15:05:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 17140 23732. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Mar 2014 15:04:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 29 11:04:36 2014
Received: from localhost ([127.0.0.1]:56294 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1WTuoE-0005Fl-Kb
	for submit <at> debbugs.gnu.org; Sat, 29 Mar 2014 11:04:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:56751)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTuoA-0005Fc-Uh
 for submit <at> debbugs.gnu.org; Sat, 29 Mar 2014 11:04:32 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTuo3-00031u-FO
 for submit <at> debbugs.gnu.org; Sat, 29 Mar 2014 11:04:30 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41886)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTuo3-00031o-Cx
 for submit <at> debbugs.gnu.org; Sat, 29 Mar 2014 11:04:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58441)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTunx-00072a-2L
 for bug-gnu-emacs@HIDDEN; Sat, 29 Mar 2014 11:04:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTunm-0002yI-8w
 for bug-gnu-emacs@HIDDEN; Sat, 29 Mar 2014 11:04:16 -0400
Received: from plane.gmane.org ([80.91.229.3]:35313)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTunl-0002xr-Um
 for bug-gnu-emacs@HIDDEN; Sat, 29 Mar 2014 11:04:06 -0400
Received: from list by plane.gmane.org with local (Exim 4.69)
 (envelope-from <geb-bug-gnu-emacs@HIDDEN>) id 1WTunj-0004Gi-Ai
 for bug-gnu-emacs@HIDDEN; Sat, 29 Mar 2014 16:04:03 +0100
Received: from p508409bd.dip0.t-ipconnect.de ([80.132.9.189])
 by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
 id 1AlnuQ-0007hv-00
 for <bug-gnu-emacs@HIDDEN>; Sat, 29 Mar 2014 16:04:03 +0100
Received: from d.newsgroups by p508409bd.dip0.t-ipconnect.de with local
 (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00
 for <bug-gnu-emacs@HIDDEN>; Sat, 29 Mar 2014 16:04:03 +0100
X-Injected-Via-Gmane: http://gmane.org/
To: bug-gnu-emacs@HIDDEN
From: Dominic =?iso-8859-1?q?J=E4nichen?= <d.newsgroups@HIDDEN>
Subject: 24.4.50; Modified mouse-click events are not translated to
 unmodified if unbound
Date: Sat, 29 Mar 2014 15:03:53 +0000 (UTC)
Lines: 180
Message-ID: <lh6nco$gld$1@HIDDEN>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Complaints-To: usenet@HIDDEN
X-Gmane-NNTP-Posting-Host: p508409bd.dip0.t-ipconnect.de
User-Agent: Pan/0.140 (Chocolate Salty Balls; GIT 098a3bb
 /usr/portage/distfiles/egit-src/pan2)
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

A keyboard event that includes modifiers as "S-" is translated to the
unmodified version if there is no binding of the modified
key. (Eg. <S-left> gets translated to <left>)
This should also happen for mouse-click events, but doesn't. (Unbind
<S-mouse-1> and <S-down-mouse-1>. Then, clicking inside a buffer with
Shift held down results in "<S-mouse-1> is undefined" in minibuffer)


(refer also to description in emacs-dev; copied here for completeness)
I am using shift-select-mode and want to activate a region using S-
mouse-1. I have <mouse-1> and <S-mouse-1> bound to "mouse-set-point". I 
either change "mouse-set-point" to contain (interactive "^e") or use cua-
mode and (put 'mouse-set-point 'CUA 'move).
I find that I can then extend existing regions with <S-mouse-1>, but not 
activate one (ie. click on some spot to activate the region between that 
spot and the current mark).

This issue exists since rev 107888 and is documented there: "Don't 
activate the region on shift if the binding is already shifted." That's 
fine for <left> as <S-left> translates to <left>, but <S-mouse-1> does 
not translate to <mouse-1>. The only option is to bind <S-mouse-1>, but 
this does not activate the region as it is already shifted.


On Fri, 28 Mar 2014 16:19:19 -0400, Stefan Monnier wrote:

> S-mouse-1 does translate to mouse-1, tho only if S-mouse-1 is not
> bound.  So instead of binding S-mouse-1 to mouse-set-point, you want to
> unbind S-mouse-1: (global-set-key [S-mouse-1] nil)

Doing that results in S-Mouse-1 being non-functional. ("<S-mouse-1> is 
undefined" in minibuffer.)




In GNU Emacs 24.4.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.11.8)
 of 2014-03-28 on dominic-gentoo
Repository revision: tsdh@HIDDEN
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --libdir=/usr/lib64 --disable-silent-rules
 --disable-dependency-tracking --program-suffix=-emacs-24-vcs
 --infodir=/usr/share/info/emacs-24-vcs
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=games --without-compress-install
 --with-file-notification=gfile --enable-acl --with-dbus --with-gnutls
 --without-gpm --without-hesiod --with-kerberos --with-kerberos5
 --with-xml2 --without-selinux --without-wide-int --with-zlib
 --with-sound=alsa --with-x --without-ns --without-gconf
 --with-gsettings --with-toolkit-scroll-bars --with-gif --with-jpeg
 --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick
 --with-xft --with-libotf --with-m17n-flt --with-x-toolkit=gtk3
 GENTOO_PACKAGE=app-editors/emacs-vcs-24.4.9999 EBZR_BRANCH=trunk
 EBZR_REVNO= 'CFLAGS=-march=native -mtune=native -frecord-gcc-switches
 -fomit-frame-pointer -fuse-linker-plugin -pipe -Wstrict-aliasing
 -Werror=strict-aliasing -Wformat=2 -Waggressive-loop-optimizations
 -Werror=aggressive-loop-optimizations -fdiagnostics-color -O3 -flto
 -fno-fat-lto-objects -floop-interchange -ftree-loop-distribution -fweb
 -fvariable-expansion-in-unroller -frename-registers -ggdb '
 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -march=native -mtune=native
 -frecord-gcc-switches -fomit-frame-pointer -fuse-linker-plugin -pipe
 -Wstrict-aliasing -Werror=strict-aliasing -Wformat=2
 -Waggressive-loop-optimizations -Werror=aggressive-loop-optimizations
 -fdiagnostics-color -O3 -flto -fno-fat-lto-objects -floop-interchange
 -ftree-loop-distribution -fweb -fvariable-expansion-in-unroller
 -frename-registers -ggdb''

Important settings:
  value of $LC_MONETARY: de_DE.utf8
  value of $LC_NUMERIC: de_DE.utf8
  value of $LC_TIME: de_DE.utf8
  value of $LANG: en_GB.utf8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<menu-bar> <buffer> C-a <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <edit> <paste> <down-mouse-1> 
<mouse-1> <double-down-mouse-1> <double-mouse-1> n 
i l <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
n i l <right> C-j <down-mouse-1> <mouse-movement> <mouse-1> 
C-h k <S-down-mouse-1> <S-mouse-1> ` <backspace> M-x 
d e s c - k <return> <S-down-mouse-1> <S-mouse-1> M-x 
d e s c - k <return> < <help-echo> <help-echo> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-1> 
<down-mouse-1> <mouse-movement> <mouse-1> <backspace> 
<backspace> <backspace> <backspace> u p <end> C-j <down-mouse-1> 
<mouse-1> <backspace> <backspace> <backspace> C-j <backspace> 
<down-mouse-1> <mouse-movement> <mouse-1> <home> <backspace> 
<end> C-j <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> <S-down-mouse-1> 
<S-mouse-1> <S-down-mouse-1> <S-mouse-1> M-x d e s 
c - k <return> <S-down-mouse-1> <S-mouse-1> M-x d e 
c <backspace> s c - k <return> <S-down-mouse-1> <S-drag-mouse-1> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <menu-bar> <help-menu> 
<send-emacs-bug-report>

Recent messages:
Type C-x 1 to delete the help window, C-M-v to scroll help.
You can run the command `describe-key' with C-h k
Type C-x 1 to delete the help window, C-M-v to scroll help.
Entering debugger...
delete-backward-char: Buffer is read-only: #<buffer *Backtrace*>
<S-mouse-1> is undefined [13 times]
<S-mouse-1> (translated from <S-down-mouse-1> <S-mouse-1>) at that spot 
is undefined
You can run the command `describe-key' with C-h k
<S-mouse-1> (translated from <S-down-mouse-1> <S-mouse-1>) at that spot 
is undefined
<S-drag-mouse-1> (translated from <S-down-mouse-1> <S-drag-mouse-1>) at 
that spot is undefined

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message idna dired format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils debug help-fns help-mode easymenu edmacro
kmacro cl-loaddefs cl-lib site-gentoo preview-latex tex-site auto-loads
time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment lisp-mode prog-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button
faces cus-face macroexp files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind gfilenotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty emacs)

Memory information:
((conses 16 84707 7284)
 (symbols 48 18518 0)
 (miscs 40 120 210)
 (strings 32 12486 4595)
 (string-bytes 1 367649)
 (vectors 16 9832)
 (vector-slots 8 379991 6635)
 (floats 8 67 335)
 (intervals 56 484 0)
 (buffers 960 14)
 (heap 1024 35758 1231))





Acknowledgement sent to Dominic Jänichen <d.newsgroups@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#17140; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.