GNU bug report logs - #15513
Isearch should clear shift-selected region

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; Reported by: Yuri Khan <yuri.v.khan@HIDDEN>; dated Thu, 3 Oct 2013 20:28:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Changed bug title to 'Isearch should clear shift-selected region' from '24.2; isearch should clear selection in transient-mark-mode' Request was from Stefan Monnier <monnier@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 15513) by debbugs.gnu.org; 3 Oct 2013 21:19:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 03 17:19:41 2013
Received: from localhost ([127.0.0.1]:52469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VRqJA-0007p4-HA
	for submit <at> debbugs.gnu.org; Thu, 03 Oct 2013 17:19:40 -0400
Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35317)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <monnier@HIDDEN>)
 id 1VRqJ7-0007or-ID; Thu, 03 Oct 2013 17:19:38 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsSSQCZEKA6R6gV6DEw
X-IPAS-Result: Av4EABK/CFFLd/fx/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsSSQCZEKA6R6gV6DEw
X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34709064"
Received: from 75-119-247-241.dsl.teksavvy.com (HELO pastel.home)
 ([75.119.247.241])
 by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA;
 03 Oct 2013 17:16:10 -0400
Received: by pastel.home (Postfix, from userid 20848)
 id EB4206036D; Thu,  3 Oct 2013 17:19:32 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Yuri Khan <yuri.v.khan@HIDDEN>
Subject: Re: bug#15513: 24.2;
 isearch should clear selection in transient-mark-mode
Message-ID: <jwv8uyaf45q.fsf-monnier+emacsbugs@HIDDEN>
References: <CAP_d_8XKGO9TAnsNip0ffk4nPi54Z_xwV7AOD8fkAqBSP0fLzw@HIDDEN>
Date: Thu, 03 Oct 2013 17:19:32 -0400
In-Reply-To: <CAP_d_8XKGO9TAnsNip0ffk4nPi54Z_xwV7AOD8fkAqBSP0fLzw@HIDDEN>
 (Yuri Khan's message of "Wed, 2 Oct 2013 10:00:22 +0700")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 15513
Cc: 15513 <at> debbugs.gnu.org, cyd@HIDDEN
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: 0.3 (/)

retitle 15513 Isearch should clear shift-selected region
thanks

> 3. Select the word This by pressing Ctrl+Shift+Right arrow.
> 4. Invoke isearch by pressing Ctrl+S.
[...]
> Observed behavior:
> * Selection is extended to include the word that was found by isearch.
> Expected behavior:
> * Since isearch is a point movement command and such commands deactivate
> the selection in transient-mark-mode, I expect selection to be
> deactivated.
> * If I press Ctrl+Space before searching, this indicates an explicit
> request for persistent selection.  In this case, the current behavior of
> isearch is correct.

Actually, any highlighted region is a transient region.  Motion commands
deactivate the current selection only in the case where the selection
was made with shifted motion commands.

So C-s should only deactivate the region if it has been activated by
shifted motion commands.

> * Additionally, it might be nice if pressing Ctrl+Shift+S behaved
> similarly to Shift+arrow keys, unconditionally activating the selection
> and extending/shrinking it to include the match.

Yes, that would make a lot of sense, although C-S-s in my setup seems
never to reach Emacs (probably caught by something like
a window-manager).


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15513; Package emacs. Full text available.

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


Received: (at 15513) by debbugs.gnu.org; 3 Oct 2013 20:56:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 03 16:56:45 2013
Received: from localhost ([127.0.0.1]:52427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VRpwy-0007HO-2I
	for submit <at> debbugs.gnu.org; Thu, 03 Oct 2013 16:56:44 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:42959)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1VRpwt-0007HD-BE
 for 15513 <at> debbugs.gnu.org; Thu, 03 Oct 2013 16:56:40 -0400
Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r93KubaE013098
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
 Thu, 3 Oct 2013 20:56:38 GMT
Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230])
 by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r93KuatF000562
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
 Thu, 3 Oct 2013 20:56:37 GMT
Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70])
 by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r93Kuaxa028181;
 Thu, 3 Oct 2013 20:56:36 GMT
MIME-Version: 1.0
Message-ID: <2caeaf90-276b-4312-9ece-a38776b8eae9@default>
Date: Thu, 3 Oct 2013 13:56:35 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: Yuri Khan <yuri.v.khan@HIDDEN>, 15513 <at> debbugs.gnu.org
Subject: RE: bug#15513: 24.2; isearch should clear selection in
 transient-mark-mode
References: <CAP_d_8XKGO9TAnsNip0ffk4nPi54Z_xwV7AOD8fkAqBSP0fLzw@HIDDEN>
In-Reply-To: <CAP_d_8XKGO9TAnsNip0ffk4nPi54Z_xwV7AOD8fkAqBSP0fLzw@HIDDEN>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8  (707110) [OL
 12.0.6680.5000 (x86)]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Source-IP: acsinet22.oracle.com [141.146.126.238]
X-Spam-Score: -3.0 (---)
X-Debbugs-Envelope-To: 15513
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: -3.0 (---)

> 3. Select the word This by pressing Ctrl+Shift+Right arrow.
> 4. Invoke isearch by pressing Ctrl+S.
> 5. Enter `notes' as the search string.
>=20
> Observed behavior:
> * Selection is extended to include the word that was found by isearch.

Yes, that is the expected (designed, documented) behavior.  This was
discussed in help-gnu-emacs, in (your) thread "automatic selection
during search".

> Expected behavior:
> * Since isearch is a point movement command and such commands deactivate
> the selection in transient-mark-mode, I expect selection to be
> deactivated.

Isearch is a lot more than just a point movement command.  And it might
or might not actually move point, in the end.  And there is no rule that
I know of that says that all point-movement commands (meaning what? any
command that moves point?) must deactivate the region before it acts.
What about `S-<right>'?  That's a point movement command - should it
too deactivate the region?

> * If I press Ctrl+Space before searching, this indicates an explicit
> request for persistent selection. In this case, the current behavior of
> isearch is correct.

You activated the region by doing `C-S-<right>', indicating an explicit
request for an active region.  Isearch extends the active region.
If you don't want that, then don't activate the region (or else deactivate
it) before invoking Isearch.

IOW, if it hurts, just don't do that.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#15513; Package emacs. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 3 Oct 2013 20:27:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 03 16:27:36 2013
Received: from localhost ([127.0.0.1]:52350 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1VRpUk-0006VJ-Hw
	for submit <at> debbugs.gnu.org; Thu, 03 Oct 2013 16:27:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:39551)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfu-00059T-1o
 for submit <at> debbugs.gnu.org; Tue, 01 Oct 2013 23:00:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfs-00011j-E1
 for submit <at> debbugs.gnu.org; Tue, 01 Oct 2013 23:00:29 -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,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:41597)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfs-00011e-9i
 for submit <at> debbugs.gnu.org; Tue, 01 Oct 2013 23:00:28 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41264)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfq-000422-A5
 for bug-gnu-emacs@HIDDEN; Tue, 01 Oct 2013 23:00:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfo-00011D-PJ
 for bug-gnu-emacs@HIDDEN; Tue, 01 Oct 2013 23:00:26 -0400
Received: from mail-la0-x22a.google.com ([2a00:1450:4010:c03::22a]:49749)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <yurivkhan@HIDDEN>) id 1VRCfo-000115-8g
 for bug-gnu-emacs@HIDDEN; Tue, 01 Oct 2013 23:00:24 -0400
Received: by mail-la0-f42.google.com with SMTP id ep20so141076lab.29
 for <bug-gnu-emacs@HIDDEN>; Tue, 01 Oct 2013 20:00:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:date:message-id:subject:from:to:content-type;
 bh=ROGVx+ztKAGHS9499aF6ezOTt48ElZ1Dt6ZmESxyYKk=;
 b=WSTXkdzEP3hUChdlwqp0UoVr4c44P8Fd7waaG/swPGaT2531lUEzC4UDqgVbZLmsPc
 kw0SDRiZXn+DmkcUQ7uw41RmdrjzsbaoTPEAW2Ex+l9k6fqt76Vx8SZ9IKUq7sOud7zf
 6oEKKY+KcmlO9yhDhYATCHD2FJeGhFNQA2qaWn/W+L+rI6OqYC0nyY4evlIGM93lLsH7
 iPQsP2iwK1v5hMOciNof2YEYCBqc0OHiAndQHgpF+iUbpcom6vsd/10B99FdZmYrBEG9
 OWhiStWrJJzYZLr1T1MgCw/1nruJdhf87PHidjcQkpEnxsaDMJQnHMy6pbS5EA1G7eqi
 OD/Q==
MIME-Version: 1.0
X-Received: by 10.152.21.34 with SMTP id s2mr52911lae.55.1380682823028; Tue,
 01 Oct 2013 20:00:23 -0700 (PDT)
Received: by 10.114.185.101 with HTTP; Tue, 1 Oct 2013 20:00:22 -0700 (PDT)
Date: Wed, 2 Oct 2013 10:00:22 +0700
X-Google-Sender-Auth: sKeGfW6cxECMJQjt9moCgFSLa50
Message-ID: <CAP_d_8XKGO9TAnsNip0ffk4nPi54Z_xwV7AOD8fkAqBSP0fLzw@HIDDEN>
Subject: 24.2; isearch should clear selection in transient-mark-mode
From: Yuri Khan <yuri.v.khan@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Content-Type: text/plain; charset=UTF-8
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
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.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 03 Oct 2013 16:27:32 -0400
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.0 (----)

This bug report will be sent to the Bug-GNU-Emacs mailing list
and the GNU bug tracker at debbugs.gnu.org.  Please check that
the From: line contains a valid email address.  After a delay of up
to one day, you should receive an acknowledgement at that address.

Please write in English if possible, as the Emacs maintainers
usually do not have translators for other languages.

Please describe exactly what actions triggered the bug, and
the precise symptoms of the bug.  If you can, give a recipe
starting from `emacs -Q':

1. Start `emacs -Q'. It opens Emacs with the default text in *scratch*
buffer:
;; This buffer is for notes you don't want[...]
1a. cua-mode is off, transient-mark-mode is on.
2. Move point before This.
3. Select the word This by pressing Ctrl+Shift+Right arrow.
4. Invoke isearch by pressing Ctrl+S.
5. Enter `notes' as the search string.

Observed behavior:
* Selection is extended to include the word that was found by isearch.

Expected behavior:
* Since isearch is a point movement command and such commands deactivate
the selection in transient-mark-mode, I expect selection to be
deactivated.
* If I press Ctrl+Space before searching, this indicates an explicit
request for persistent selection. In this case, the current behavior of
isearch is correct.
* Additionally, it might be nice if pressing Ctrl+Shift+S behaved
similarly to Shift+arrow keys, unconditionally activating the selection
and extending/shrinking it to include the match.


In GNU Emacs 24.2.1 (x86_64-pc-linux-gnu, GTK+ Version 3.6.4)
 of 2013-04-09 on allspice, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11303000
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.2/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: en_RU.UTF-8
  value of $LC_NUMERIC: en_RU.UTF-8
  value of $LC_TIME: en_RU.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-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:
M-x e m a <backspace> <backspace> <backspace> r e p
o s <backspace> r t <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs/24.2/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/24.2/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/24.2/lisp/textmodes/flyspell
/usr/share/emacs/24.2/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/24.2/lisp/textmodes/ispell

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image
fringe lisp-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 loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)




Acknowledgement sent to Yuri Khan <yuri.v.khan@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#15513; 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: Fri, 31 Oct 2014 17:00:04 UTC

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