From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrey Listopadov 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 22:07:26 +0300 Message-ID: References: <831r1uhqra.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40003"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52896@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 30 20:09:10 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 1n30nW-000AD7-1i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 20:09:10 +0100 Original-Received: from localhost ([::1]:60220 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n30nU-0006X2-PU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 30 Dec 2021 14:09:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n30nO-0006We-9o for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42946) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n30nO-0000GC-0J for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n30nN-0007QI-T3 for bug-gnu-emacs@gnu.org; Thu, 30 Dec 2021 14:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrey Listopadov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 30 Dec 2021 19:09:01 +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.164089129028447 (code B ref 52896); Thu, 30 Dec 2021 19:09:01 +0000 Original-Received: (at 52896) by debbugs.gnu.org; 30 Dec 2021 19:08:10 +0000 Original-Received: from localhost ([127.0.0.1]:54492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n30mY-0007Ol-5E for submit@debbugs.gnu.org; Thu, 30 Dec 2021 14:08:10 -0500 Original-Received: from mail-ed1-f44.google.com ([209.85.208.44]:34330) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n30mW-0007OT-Nj for 52896@debbugs.gnu.org; Thu, 30 Dec 2021 14:08:09 -0500 Original-Received: by mail-ed1-f44.google.com with SMTP id x15so101527790edv.1 for <52896@debbugs.gnu.org>; Thu, 30 Dec 2021 11:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UdyeXh/vetndBW9i9q/D7Ldmp72oqYiaW4SxDOA7Qag=; b=Nqaoem9t7DLLkZjbmdMQLMpeGouHaNe0qY25RxzIWH8YVwssLYvIGrKlDLPJTwUziw G5HkgDZAzmduS6HIVb4a1Oq6Nu0T8airaNOqYLUBeR3KKsZ4MT4gSEghtv3abIh1h8W6 U5FJLTfV2RW8QNG8KuuDswTUydhg4ZVz/xuLxO3O7LzayMxByqDV7nd+sn0GEyWH1ffP vleZIv30tTBlxxcWY+bMR3vXIwupZmsThND2tXDqHaUfbK+r/YuiotTdjad3uuEEeM3p kWpb+5xc2EH9ZTqsZfeyokx6cwScFEwmoVvy9TPXrflJqTjqpA222/2fc4/vKSRnUo7C bPwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UdyeXh/vetndBW9i9q/D7Ldmp72oqYiaW4SxDOA7Qag=; b=sXMHS2AnE987R4I0vVB08AnrpWssB2Izy+BWNaOJsX0qj3C3wgKoc6duxS7Npt5nyd 5+n+Tmf2EAVNyDssSxXbAN8EFLraRNfaXA4EPim2z6U28H+pTdhBNh9yT/HlDV+72f/H vFf76zRtpWN7jOLxQ+1cRn6pCA9LC3KSNR8jiZ7ekbe38JUlREE1JhDnPM9fWfwPZk55 Y8n3e6xOrDQ/9YhxNZ7KP2WPmNTfPW1Fb1z22j2HKPeWp6WDjgX4dwaFoE8908CEwoCG 6K6YEOJvxCfdO3wrX7Ejgy9cXwakMJo2D9uVUk3yM4VOJzv5NpEFLTF0qUF4fifuBhFr 4PJg== X-Gm-Message-State: AOAM5307E3iwgMX7mCDcG9mgmS1bM+5pXHl75lhubQyeDMUjHv2YLpL3 TFpUhBOxZk2zPM6C/IEhviyC5Fr/jykizpxyEKs= X-Google-Smtp-Source: ABdhPJx010p9ChzX8sJZnY468PEg8AnkTGk1NIt0IMRk95oT6BX0vOyDehzfccwVrwx3zbCkH9ZnBjbfdQs86UFvZNA= X-Received: by 2002:a17:907:3d88:: with SMTP id he8mr26925129ejc.241.1640891282880; Thu, 30 Dec 2021 11:08:02 -0800 (PST) In-Reply-To: <831r1uhqra.fsf@gnu.org> 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:223444 Archived-At: > 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)'. And since expand-region conses `only' initially, the `exchange-point-and-mark' function then rapidly conses a lot of symbols to it as well, since expand region uses it. > So I suspect that the expand-region.el package you installed does > something to cause this, and in particular doesn't take care to reset > the value when it should. I don't think it should reset it, e.g. it behaves well, and sets it to allow shift-select to work: https://github.com/magnars/expand-region.el/pull/225 > 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. -- Andrey Listopadov