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: Sun, 7 Oct 2018 01:02:28 +0000 (UTC) Message-ID: <8e713508-f360-4fcd-9288-e094d450683a@default> References: <<>> <<5399d374-2089-492a-b830-9eb2baac82a6@default>> <> 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 1538874069 19617 195.159.176.226 (7 Oct 2018 01:01:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2018 01:01:09 +0000 (UTC) Cc: 32956@debbugs.gnu.org To: charles@aurox.ch, Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 07 03:01: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 1g8xRQ-0004zI-UA for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Oct 2018 03:01:05 +0200 Original-Received: from localhost ([::1]:40783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8xTX-0005vk-Fx for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Oct 2018 21:03:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8xTR-0005vP-5h for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 21:03:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8xTM-00041c-5x for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 21:03:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34686) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g8xTK-00040v-7O for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 21:03:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g8xTK-0004pC-30 for bug-gnu-emacs@gnu.org; Sat, 06 Oct 2018 21:03: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: Sun, 07 Oct 2018 01:03: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: fixed Original-Received: via spool by 32956-submit@debbugs.gnu.org id=B32956.153887416218516 (code B ref 32956); Sun, 07 Oct 2018 01:03:02 +0000 Original-Received: (at 32956) by debbugs.gnu.org; 7 Oct 2018 01:02:42 +0000 Original-Received: from localhost ([127.0.0.1]:38944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8xT0-0004oZ-9r for submit@debbugs.gnu.org; Sat, 06 Oct 2018 21:02:42 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:46054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8xSx-0004oL-Rx for 32956@debbugs.gnu.org; Sat, 06 Oct 2018 21:02:40 -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 w970xAWa180430; Sun, 7 Oct 2018 01:02:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=P9JIwZv4xOZwlsLTxk2gwy8/KD2oxhuA+3eUUTvdLWs=; b=hD2QNo67dw/L/0dkL804jkOJ3GQzCWpC79pusnt2UB5X6qlK8D4oN/hDirbG1fnSaYFM TzlZskIIiq/p3ZjLrMWNIXr1q5KjfGHwJbpsEHCgCVnbUyNbPWWIw9BuvyXrKLVYf/tB OXYw19ouOYfoMOJqiaqd2G8vp3dqQ2FxuaNklffz0j8xJfRskSvdLRORc6FOoRjFITDJ OhiPG8O4tvkWkTRqcmOlEzqYJChxGXoNv06dn2YziqVGiK3VjVo/1f0hduDk21iNb4jx wXDvziz1M78xmd95D9Yn8gNi9MSvP3IIn3OM4MHeELRCKjkS3CzmYrh4U0lFFEynlqNw nQ== Original-Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2mxn0phr84-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 07 Oct 2018 01:02:31 +0000 Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9712UIh021403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 7 Oct 2018 01:02:30 GMT Original-Received: from ubhmp0017.oracle.com (ubhmp0017.oracle.com [156.151.24.70]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9712T8e012144; Sun, 7 Oct 2018 01:02:29 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=9038 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-1810070009 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:150969 Archived-At: > > 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. >=20 > Hmm, deactivate-mark is nil by default -- what effect would setting it > to "nil" again have? Is it to counteract the effect of previous > function calls within the command, which may have set > "deactivate-mark" to "t"? This is about defining a command that activates the region and wants to leave/keep it activated after the command is finished. Consider, as one example, a repeatable command that does something with the active region (e.g. indents it). Because it is repeatable it wants to keep the region=20 activated, for the next action. It needs to do this at the end: (setq deactivate-mark nil). Users sometimes try to define commands that try to leave the region active, not realizing that the command loop will deactivate the region when the command is done - unless the command sets `deactivate-mark' to nil. > > 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. >=20 > Again, though, deactivate-mark is "nil" by default, so it seems that > some editing function has to set it to "t" for the mark to really be > deactivated. I don't understand what you mean by "really be deactivated". But see above.