From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#32956: 26.1.50; t-m-m mark deactivation documentation Date: Sat, 6 Oct 2018 14:48:01 +0000 (UTC) Message-ID: <5399d374-2089-492a-b830-9eb2baac82a6@default> References: <> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538837230 19841 195.159.176.226 (6 Oct 2018 14:47:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Oct 2018 14:47:10 +0000 (UTC) To: charles@aurox.ch, 32956@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 06 16:47:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8nrD-00051U-Gr for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 16:47:03 +0200 Original-Received: from localhost ([::1]:39447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8ntJ-0005fu-VR for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 10:49:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8ntB-0005fY-PA for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 10:49:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8nt8-0002NF-IZ for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 10:49:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34481) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8nt8-0002Mu-DV for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8nt8-00056B-AT for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 10:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Oct 2018 14:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32956 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32956-submit@debbugs.gnu.org id=B32956.153883730519553 (code B ref 32956); Sat, 06 Oct 2018 14:49:02 +0000 Original-Received: (at 32956) by debbugs.gnu.org; 6 Oct 2018 14:48:25 +0000 Original-Received: from localhost ([127.0.0.1]:38739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8nsW-00055I-MZ for submit@debbugs.gnu.org; Sat, 06 Oct 2018 10:48:24 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:55914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8nsU-000555-NA for 32956@debbugs.gnu.org; Sat, 06 Oct 2018 10:48:23 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w96EjD0R007191; Sat, 6 Oct 2018 14:48:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=cOZXOOWK315dDoeYSU2pW3Kauv3IKmStxZXHAcTo3wI=; b=2mqOchhECu1MzUijeMtVkDmfqaA2eyCxMFInIT4C3ISCNBRx89wROQMFkSjnz+Cnzfd+ 3Q6RtYkxDxOvlH0d/0XS+gScux7RzY5yxxEMFKnqsfMmkCQoqEd8v3jS+nRaevkSURqU CmrpxkOHlpjH8CFqgTAlXbbcumEklGQ3kNLXI4PQrldD5SuTcmNLOXrgYQ5CS6V5Puqh X0g14ctXn/fmFG7lBaT4vj2YeuyK1OZkVCOjEtIIOChJ2DebqtPtVDPambgK5yHGqpfe XNUQJlLIF/5E++HDzVOeLS5roK4WK+sBCRTSf0OHfw24SzuJcnkoZ8wJvGJKljvU9KCD xQ== Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp2120.oracle.com with ESMTP id 2mxn0ph1xq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 06 Oct 2018 14:48:08 +0000 Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w96Em2kK029991 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 6 Oct 2018 14:48:02 GMT Original-Received: from ubhmp0012.oracle.com (ubhmp0012.oracle.com [156.151.24.65]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w96Em2E0017944; Sat, 6 Oct 2018 14:48:02 GMT In-Reply-To: <> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4735.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9037 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810060150 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150962 Archived-At: > Transient Mark mode is a global minor mode. When enabled, the > region is highlighted with the `region' face whenever the mark > -is active. The mark is \"deactivated\" by changing the buffer, > -and after certain other operations that set the mark but whose > -main purpose is something else--for example, incremental search, > -\\[beginning-of-buffer], and \\[end-of-buffer]. > +is active. The mark is \"deactivated\" after certain non-motion > +commands, including those that change the text in the buffer, and > +during shift or mouse selection by any unshifted cursor motion > +command (see Info node `Shift Selection' for more details). >=20 > You can also deactivate the mark by typing \\[keyboard-quit] or > \\[keyboard-escape-quit]. The Elisp manual, node `The Mark' has similar text, so if an update to the doc string is called for then maybe the manual text needs a similar update. ____ BTW, this (the manual) might be a good place to mention to Elisp users that (in `transient-mark-mode', at least) the mark is also deactivated by default after each command, by the command loop. Some commands inhibit this automatic deactivation. This is a fairly common question by Elisp users who try to write a command that they think/hope will end with the region staying activated (e.g. for use by a follow-up command). This is maybe a good place to tell them about the automatic deactivation (by default), and maybe even let them know that they can use (setq deactivate-mark nil) at the end of a command definition to inhibit automatic deactivation. In fact, this bit of `The Mark' doesn't seem quite right: A command can ... request deactivation of the mark upon return to the editor command loop by setting the variable 'deactivate-mark' to a non-'nil' value. I think that's a bit backward, at least in `transient-mark-mode'. IIUC, the command loop automatically deactivates the mark after each command, unless `deactivate-mark' is non-nil. A command (in t-m-m, at least) need not set that variable to non-nil to deactivate the mark, as it is normally treated as such. The opposite is true: If you want the region to stay active after your command is done (so that it is active for the next command) then your command can set `deactivate-mark' to nil to prevent automatic deactivation.