all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrey Listopadov <andreyorst@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 52896@debbugs.gnu.org
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	[thread overview]
Message-ID: <CAAKhXoYtLSM4N+y0sMqJzNj69PccM3rwXOndD1joBRGo9hJqmA@mail.gmail.com> (raw)
In-Reply-To: <831r1uhqra.fsf@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)'.
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





  reply	other threads:[~2021-12-30 19:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30  9:53 bug#52896: 29.0.50; transient-mark-mode is set to a lot of 'only syms Andrey Listopadov
2021-12-30 18:49 ` Eli Zaretskii
2021-12-30 19:07   ` Andrey Listopadov [this message]
2021-12-30 19:20     ` Eli Zaretskii
2021-12-30 20:02       ` Andrey Listopadov
2021-12-30 20:17         ` Eli Zaretskii
2021-12-30 20:20           ` Andrey Listopadov
2021-12-30 20:27             ` Andrey Listopadov
2021-12-30 20:32               ` Andrey Listopadov
2021-12-30 20:40                 ` Andrey Listopadov
2022-01-03 14:21                   ` Eli Zaretskii
2022-01-03 14:54                     ` Eli Zaretskii
2022-01-07 18:17                       ` Andrey Listopadov
2022-01-07 18:32                         ` Eli Zaretskii
2022-01-07 18:52                           ` Andrey Listopadov
2022-02-13 10:11                             ` Lars Ingebrigtsen
2022-02-13 11:31                               ` Andrey Listopadov
2022-02-13 13:23                                 ` Eli Zaretskii
2022-02-14 10:49                                   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAKhXoYtLSM4N+y0sMqJzNj69PccM3rwXOndD1joBRGo9hJqmA@mail.gmail.com \
    --to=andreyorst@gmail.com \
    --cc=52896@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.