From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#52896: 29.0.50; transient-mark-mode is set to a lot of 'only syms Date: Thu, 30 Dec 2021 21:20:16 +0200 Message-ID: <83zgohhpcf.fsf@gnu.org> References: <831r1uhqra.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17916"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52896@debbugs.gnu.org To: Andrey Listopadov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 30 20:21:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n30zD-0004TW-79 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 20:21:15 +0100 Original-Received: from localhost ([::1]:35278 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n30zB-0000w4-OO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 14:21:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57432) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n30z1-0000sU-9q for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42952) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n30z0-00058k-ET for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n30z0-0007mU-7n for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Dec 2021 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52896 X-GNU-PR-Package: emacs Original-Received: via spool by 52896-submit@debbugs.gnu.org id=B52896.164089203929868 (code B ref 52896); Thu, 30 Dec 2021 19:21:02 +0000 Original-Received: (at 52896) by debbugs.gnu.org; 30 Dec 2021 19:20:39 +0000 Original-Received: from localhost ([127.0.0.1]:54498 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n30yd-0007lg-Ax for submit@debbugs.gnu.org; Thu, 30 Dec 2021 14:20:39 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:56530) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n30yc-0007lN-0p for 52896@debbugs.gnu.org; Thu, 30 Dec 2021 14:20:38 -0500 Original-Received: from [2001:470:142:3::e] (port=52020 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n30yU-0004zJ-Ja; Thu, 30 Dec 2021 14:20:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IoVxFtOKINl1vNGaewfxUrYNaDdGGe+N2PS+KqCxXrA=; b=luIxmtrHdHAl 5456clqZERPjFa/lKaRElzI5Otrcum2/o2p8jC6gD1hqhpnmqTJ1JnANe53BNLbM2D7VahZHr0eYx zvLSl6AIPCRV+lDKvwmXiyWuOxHwQE8fZgBcRt3vsQLqHwPR8oUpkD593CgL6UREAOhrSy4FXHI42 mZCWHb/zWzb3Nqh7RfBCDDjRLg7pBEQgY06/qJtKjWOj4La6mAujFHHkQjvRvmUqbbeI8ex1oFyhc 9u/s48n4u+P7w/4hHi9xlxkGAGbRgjeEeCdLW+9roqRg1qPw5iDY2Jo+AeSmRcxbqvB1DjguOU6fB pTsdQzN5iGlVBFp6qcTaGg==; Original-Received: from [87.69.77.57] (port=3882 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n30yB-0000hh-TL; Thu, 30 Dec 2021 14:20:30 -0500 In-Reply-To: (message from Andrey Listopadov on Thu, 30 Dec 2021 22:07:26 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:223445 Archived-At: > From: Andrey Listopadov > Date: Thu, 30 Dec 2021 22:07:26 +0300 > Cc: 52896@debbugs.gnu.org > > > How come transient-mark-mode became set to 'only' in the first place? > > That is supposed to happen only when shift-translated commands are > > used, and should be reset to the old value whenever the first > > non-shift-translated command is used. See the doc string of > > transient-mark-mode (the variable). > > The expand-region package sets transient mark mode to `only' when tmm > is disabled: > > https://github.com/magnars/expand-region.el/blob/4b8322774d9c1d8b64a0049d1dbbc1e7ce80c1a0/expand-region-core.el#L57 > https://github.com/magnars/expand-region.el/blob/4b8322774d9c1d8b64a0049d1dbbc1e7ce80c1a0/expand-region-core.el#L163 > > > You can see how it works if, in "emacs -Q", you press and hold Shift > > and use arrow keys to move point, then evaluate > > > > M-: transient-mark-mode RET > > > > You should then see the value '(only . t)' of the variable. Once you > > type some unshifted command, like C-f, the value becomes t again. > > Yes, I know, but in the case when transient mark mode is disabled, its > value is not `(only . t)', but `(only . nil)' which is just `(only)'. That's true, but in "emacs -Q", once I use a non-shifted command, the value becomes just nil, as intended. > > Bottom line: you should look in expand-region.el for the reasons of > > this misbehavior, and perhaps report a bug to its developers. > > Unfortunately, Magnar Sveen disabled the issue-reporting feature of > github for this particular project. > However, looking at the docstring, I guess what expand-region does is > correct, and the `exchange-point-and-mark' function does kind of a > weird check - e.g. it checks if the car of `transient-mark-mode' is > `only' and then conses another only to that. > But again, I'm not sure what's the intention here, maybe it is expected. It sounds like expand-region.el assumes something about an internal implementation detail of this variable.