GNU bug report logs - #52896
29.0.50; transient-mark-mode is set to a lot of 'only syms

Previous Next

Package: emacs;

Reported by: Andrey Listopadov <andreyorst <at> gmail.com>

Date: Thu, 30 Dec 2021 09:54:01 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 52896 in the body.
You can then email your comments to 52896 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 09:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrey Listopadov <andreyorst <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 30 Dec 2021 09:54:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 12:53:08 +0300
I've installed the expand-region.el package and noticed that transient
mark mode started misbehaving.  I'm using Emacs with
`transient-mark-mode' disabled, and enable it occasionally via `C-SPC
C-SPC' when needed.  After using `er/expand-region' function I've
noticed that `C-SPC C-SPC' doesn't highlight the region.  Upon further
inspection I've noticed that the `transient-mark-mode' variable is set
to `(only only only only only ... only) with a total of 26 `only'
symbols.  Symbols disappear one by one when I move the point or invoke
other commands, so eventually `C-SPC C-SPC' starts working again.

I've added a watcher to the `transient-mark-mode' variable and upon
first activation of expand region I see this:

    transient-mark-mode (only) set #<buffer *scratch*>
    transient-mark-mode (only only) set #<buffer *scratch*>
    transient-mark-mode (only only only) set #<buffer *scratch*>
    transient-mark-mode (only only only only) set #<buffer *scratch*>
    Type = to expand again, - to contract, 0 to reset

Upon further investigation I've found that this happens inside the
`exchange-point-and-mark' function.  I've added a message right before
`cons' call to confirm that:

    transient-mark-mode (only) set #<buffer *scratch*>
    exchange-point-and-mark
    transient-mark-mode (only only) set #<buffer *scratch*>
    exchange-point-and-mark
    transient-mark-mode (only only only) set #<buffer *scratch*>
    exchange-point-and-mark
    transient-mark-mode (only only only only) set #<buffer *scratch*>
    Type = to expand again, - to contract, 0 to reset

The function explicitly checks if ``(eq (car-safe transient-mark-mode)
'only)'' is true and then conses `only' to the `transient-mark-mode',
causing it to grow.  I'm not sure what is the intention here, but this
makes it harder using `C-SPC C-SPC` to temporarily activate the
transient mark mode.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.17.4)
 of 2021-12-29 built on toolbox
Repository revision: 3fc8032a1aac535e8f6ba03547bd9fa2b0880193
Repository branch: master
System Description: Fedora Linux 35 (Workstation Edition)

Configured using:
 'configure --with-native-compilation --with-pgtk
 --prefix=/home/alist/.local'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug sendmail comp comp-cstr cl-extra
help-mode pcase org-macs cap-words superword subword ruby-mode smie rx
python tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x
tramp-compat shell pcomplete parse-time iso8601 ls-lisp format-spec
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-enc xmltok html-mode-expansions sgml-mode facemenu dom cc-cmds
cc-engine cc-vars cc-defs er-basic-expansions thingatpt
expand-region-core advice expand-region-custom warnings cl compile
comint ansi-color ring autoload radix-tree lisp-mnt tar-mode arc-mode
archive-mode mm-archive message yank-media dired dired-loaddefs rfc822
mml mml-sec epa derived epg rfc6068 epg-config gnus-util
text-property-search time-date mailabbrev gmm-utils mailheader mm-decode
mm-bodies mm-encode mail-utils gnutls network-stream url-http mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm rmc
puny url-cache url-auth cus-edit pp cus-start cus-load wid-edit
finder-inf package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/pgtk-win pgtk-win term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 193794 12810)
 (symbols 48 17181 1)
 (strings 32 60612 2225)
 (string-bytes 1 2133315)
 (vectors 16 30994)
 (vector-slots 8 449511 20505)
 (floats 8 76 163)
 (intervals 56 595 0)
 (buffers 992 15))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 18:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 20:49:45 +0200
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> Date: Thu, 30 Dec 2021 12:53:08 +0300
> 
> I've installed the expand-region.el package and noticed that transient
> mark mode started misbehaving.  I'm using Emacs with
> `transient-mark-mode' disabled, and enable it occasionally via `C-SPC
> C-SPC' when needed.  After using `er/expand-region' function I've
> noticed that `C-SPC C-SPC' doesn't highlight the region.  Upon further
> inspection I've noticed that the `transient-mark-mode' variable is set
> to `(only only only only only ... only) with a total of 26 `only'
> symbols.  Symbols disappear one by one when I move the point or invoke
> other commands, so eventually `C-SPC C-SPC' starts working again.
> 
> I've added a watcher to the `transient-mark-mode' variable and upon
> first activation of expand region I see this:
> 
>     transient-mark-mode (only) set #<buffer *scratch*>
>     transient-mark-mode (only only) set #<buffer *scratch*>
>     transient-mark-mode (only only only) set #<buffer *scratch*>
>     transient-mark-mode (only only only only) set #<buffer *scratch*>
>     Type = to expand again, - to contract, 0 to reset
> 
> Upon further investigation I've found that this happens inside the
> `exchange-point-and-mark' function.  I've added a message right before
> `cons' call to confirm that:
> 
>     transient-mark-mode (only) set #<buffer *scratch*>
>     exchange-point-and-mark
>     transient-mark-mode (only only) set #<buffer *scratch*>
>     exchange-point-and-mark
>     transient-mark-mode (only only only) set #<buffer *scratch*>
>     exchange-point-and-mark
>     transient-mark-mode (only only only only) set #<buffer *scratch*>
>     Type = to expand again, - to contract, 0 to reset
> 
> The function explicitly checks if ``(eq (car-safe transient-mark-mode)
> 'only)'' is true and then conses `only' to the `transient-mark-mode',
> causing it to grow.  I'm not sure what is the intention here, but this
> makes it harder using `C-SPC C-SPC` to temporarily activate the
> transient mark mode.

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).

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.

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.

Bottom line: you should look in expand-region.el for the reasons of
this misbehavior, and perhaps report a bug to its developers.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 19:09:01 GMT) Full text and rfc822 format available.

Message #11 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: 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
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 19:21:02 GMT) Full text and rfc822 format available.

Message #14 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: 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
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> Date: Thu, 30 Dec 2021 22:07:26 +0300
> Cc: 52896 <at> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:03:02 GMT) Full text and rfc822 format available.

Message #17 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 23:02:13 +0300
> That's true, but in "emacs -Q", once I use a non-shifted command, the
> value becomes just nil, as intended.

Here's how to reproduce this without expand-region in `emacs -Q'

1. `M-x transient-mark-mode RET' - disabling tmm;
2. Shift-right on some word in the *scratch* buffer - initial `only'
is consed to `transient-mark-mode';
3. `C-x C-x' `C-x C-x' `C-x C-x' to invoke the
`exchange-point-and-mark' function several times;
4. `C-h v transient-mark-mode RET' - the value is `(only only only only only)'.

So I guess this is the `exchange-point-and-mark' issue.

-- 
Andrey Listopadov




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:18:02 GMT) Full text and rfc822 format available.

Message #20 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 22:17:54 +0200
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> Date: Thu, 30 Dec 2021 23:02:13 +0300
> Cc: 52896 <at> debbugs.gnu.org
> 
> > That's true, but in "emacs -Q", once I use a non-shifted command, the
> > value becomes just nil, as intended.
> 
> Here's how to reproduce this without expand-region in `emacs -Q'
> 
> 1. `M-x transient-mark-mode RET' - disabling tmm;
> 2. Shift-right on some word in the *scratch* buffer - initial `only'
> is consed to `transient-mark-mode';
> 3. `C-x C-x' `C-x C-x' `C-x C-x' to invoke the
> `exchange-point-and-mark' function several times;
> 4. `C-h v transient-mark-mode RET' - the value is `(only only only only only)'.

If you then perform enough non-shifted commands, the value goes back
to nil.  So I'm not sure I see the problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:22:02 GMT) Full text and rfc822 format available.

Message #23 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 23:20:20 +0300
> If you then perform enough non-shifted commands, the value goes back
> to nil.  So I'm not sure I see the problem.

No, it doesn't.  Instead, it removes a single `once' from the list per
executed command.  So if you have a list of `(once once once once)',
pressing `C-a' will turn it to `(once once once)'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:28:02 GMT) Full text and rfc822 format available.

Message #26 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 23:27:08 +0300
sorry, misinterpreted.

Yes, if I perform *enough* commands, it goes back to `nil'.  But the
problem is that I can easily make this list a giant one, the way I've
described in the previous message - repeated execution of exchange
point and mark clearly misbehaves here




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:34:01 GMT) Full text and rfc822 format available.

Message #29 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 23:32:23 +0300
Perhaps the intention was that the execution of
`exchange-point-and-mark' would remove `once' from the list, so the
function should add it back thus ensuring that the highlighting added
by the shift select would not go away.  However, this instead results
in an uncontrollably growing list, which then interferes with `C-SPC
C-SPC'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Thu, 30 Dec 2021 20:42:02 GMT) Full text and rfc822 format available.

Message #32 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Thu, 30 Dec 2021 23:40:25 +0300
So, to be clear, the issue is that `C-SPC C-SPC' doesn't enable region
highlighting, preventing from running functions that operate on the
active region.
Full reproduction steps for `emacs -Q' once again:

1. M-x transient-mark-mode RET - turn tmm off;
2. S-right - select the default text in the *scratch* buffer;
3. `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x` -
this would cons some `only' symbols to the list;
4. `C-g' - remove the region highlighting, this removes one `only'
from the list;
5. `C-SPC C-SPC' - displays a message "mark set" and then "mark
activated",  but no highlighting happens, because of remaining `only'
in the list.

Only after *enough* `C-SPC C-SPC' or other commands, the region
highlighting begins to work again.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Mon, 03 Jan 2022 14:22:02 GMT) Full text and rfc822 format available.

Message #35 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Mon, 03 Jan 2022 16:21:52 +0200
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> Date: Thu, 30 Dec 2021 23:40:25 +0300
> Cc: 52896 <at> debbugs.gnu.org
> 
> 1. M-x transient-mark-mode RET - turn tmm off;
> 2. S-right - select the default text in the *scratch* buffer;
> 3. `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x`, `C-x C-x` -
> this would cons some `only' symbols to the list;
> 4. `C-g' - remove the region highlighting, this removes one `only'
> from the list;
> 5. `C-SPC C-SPC' - displays a message "mark set" and then "mark
> activated",  but no highlighting happens, because of remaining `only'
> in the list.

Thanks.  Does the patch below give good results, i.e. does it fix this
problem without introducing any others?

diff --git a/lisp/simple.el b/lisp/simple.el
index 070d276..31463a7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6664,7 +6664,7 @@ exchange-point-and-mark
         (user-error "No mark set in this buffer"))
     (set-mark (point))
     (goto-char omark)
-    (cond (temp-highlight
+    (cond ((not temp-highlight)
 	   (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
 	  ((xor arg (not (region-active-p)))
 	   (deactivate-mark))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Mon, 03 Jan 2022 14:55:01 GMT) Full text and rfc822 format available.

Message #38 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: andreyorst <at> gmail.com
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Mon, 03 Jan 2022 16:54:35 +0200
> Date: Mon, 03 Jan 2022 16:21:52 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 52896 <at> debbugs.gnu.org
> 
> Thanks.  Does the patch below give good results, i.e. does it fix this
> problem without introducing any others?

Sorry, please use the patch below instead:

diff --git a/lisp/simple.el b/lisp/simple.el
index 070d276..cbcde9f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6664,7 +6664,7 @@ exchange-point-and-mark
         (user-error "No mark set in this buffer"))
     (set-mark (point))
     (goto-char omark)
-    (cond (temp-highlight
+    (cond ((and (not arg) (not temp-highlight))
 	   (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
 	  ((xor arg (not (region-active-p)))
 	   (deactivate-mark))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Fri, 07 Jan 2022 18:28:01 GMT) Full text and rfc822 format available.

Message #41 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Fri, 7 Jan 2022 21:17:41 +0300
> Sorry, please use the patch below instead:
>
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 070d276..cbcde9f 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -6664,7 +6664,7 @@ exchange-point-and-mark
>          (user-error "No mark set in this buffer"))
>      (set-mark (point))
>      (goto-char omark)
> -    (cond (temp-highlight
> +    (cond ((and (not arg) (not temp-highlight))
>            (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
>           ((xor arg (not (region-active-p)))
>            (deactivate-mark))

Seems to work without issues




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Fri, 07 Jan 2022 18:33:01 GMT) Full text and rfc822 format available.

Message #44 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Fri, 07 Jan 2022 20:32:38 +0200
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> Date: Fri, 7 Jan 2022 21:17:41 +0300
> Cc: 52896 <at> debbugs.gnu.org
> 
> > Sorry, please use the patch below instead:
> >
> > diff --git a/lisp/simple.el b/lisp/simple.el
> > index 070d276..cbcde9f 100644
> > --- a/lisp/simple.el
> > +++ b/lisp/simple.el
> > @@ -6664,7 +6664,7 @@ exchange-point-and-mark
> >          (user-error "No mark set in this buffer"))
> >      (set-mark (point))
> >      (goto-char omark)
> > -    (cond (temp-highlight
> > +    (cond ((and (not arg) (not temp-highlight))
> >            (setq-local transient-mark-mode (cons 'only transient-mark-mode)))
> >           ((xor arg (not (region-active-p)))
> >            (deactivate-mark))
> 
> Seems to work without issues

Thanks for testing.  I installed this on the master branch, and will
consider backporting to emacs-28 if no issues are reported for it.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Fri, 07 Jan 2022 18:54:01 GMT) Full text and rfc822 format available.

Message #47 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Fri, 7 Jan 2022 21:52:16 +0300
> Thanks for testing.  I installed this on the master branch, and will
> consider backporting to emacs-28 if no issues are reported for it.

Thank you! Will keep an eye on this in case any errors show up.




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 15 Jan 2022 09:55:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Sun, 13 Feb 2022 10:12:02 GMT) Full text and rfc822 format available.

Message #52 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50; transient-mark-mode is set to a lot of
 'only syms
Date: Sun, 13 Feb 2022 11:11:10 +0100
Andrey Listopadov <andreyorst <at> gmail.com> writes:

>> Thanks for testing.  I installed this on the master branch, and will
>> consider backporting to emacs-28 if no issues are reported for it.
>
> Thank you! Will keep an eye on this in case any errors show up.

This was a month ago -- Eli, should this be backported?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Sun, 13 Feb 2022 11:32:02 GMT) Full text and rfc822 format available.

Message #55 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Andrey Listopadov <andreyorst <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50; transient-mark-mode is set to a lot of 'only syms
Date: Sun, 13 Feb 2022 11:31:44 +0000
On February 13, 2022 10:11:10 AM UTC, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
>Andrey Listopadov <andreyorst <at> gmail.com> writes:
>
>>> Thanks for testing.  I installed this on the master branch, and will
>>> consider backporting to emacs-28 if no issues are reported for it.
>>
>> Thank you! Will keep an eye on this in case any errors show up.
>
>This was a month ago -- Eli, should this be backported?
>

No issues so far on my side either




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Sun, 13 Feb 2022 13:25:01 GMT) Full text and rfc822 format available.

Message #58 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Andrey Listopadov <andreyorst <at> gmail.com>
Cc: larsi <at> gnus.org, 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50;
 transient-mark-mode is set to a lot of 'only syms
Date: Sun, 13 Feb 2022 15:23:52 +0200
> Date: Sun, 13 Feb 2022 11:31:44 +0000
> From: Andrey Listopadov <andreyorst <at> gmail.com>
> CC: Eli Zaretskii <eliz <at> gnu.org>, 52896 <at> debbugs.gnu.org
> 
> On February 13, 2022 10:11:10 AM UTC, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> >Andrey Listopadov <andreyorst <at> gmail.com> writes:
> >
> >>> Thanks for testing.  I installed this on the master branch, and will
> >>> consider backporting to emacs-28 if no issues are reported for it.
> >>
> >> Thank you! Will keep an eye on this in case any errors show up.
> >
> >This was a month ago -- Eli, should this be backported?
> >
> 
> No issues so far on my side either

Alright, cherry-picked now.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#52896; Package emacs. (Mon, 14 Feb 2022 10:50:01 GMT) Full text and rfc822 format available.

Message #61 received at 52896 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Andrey Listopadov <andreyorst <at> gmail.com>, 52896 <at> debbugs.gnu.org
Subject: Re: bug#52896: 29.0.50; transient-mark-mode is set to a lot of
 'only syms
Date: Mon, 14 Feb 2022 11:49:11 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> No issues so far on my side either
>
> Alright, cherry-picked now.

Thanks; I'm closing this bug report, then.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 52896 <at> debbugs.gnu.org and Andrey Listopadov <andreyorst <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 14 Feb 2022 10:50:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 14 Mar 2022 11:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.