GNU bug report logs - #32379
27.0.50; Todo mode commands can change active region

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Mon, 6 Aug 2018 21:38:02 UTC

Severity: normal

Found in version 27.0.50

Done: Stephen Berman <stephen.berman <at> gmx.net>

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 32379 in the body.
You can then email your comments to 32379 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#32379; Package emacs. (Mon, 06 Aug 2018 21:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 06 Aug 2018 21:38:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Todo mode commands can change active region
Date: Mon, 06 Aug 2018 23:37:08 +0200
If there is an active region (i.e. non-nil transient-mark-mode) in a
todo-mode category, then various todo-mode commands have the unintended
side-effect of shifting the region, i.e. highlighting a different part
of the category.  (FTR, the commands are those bound by default in
todo-mode as follows: `f', `b', `j', `g', `v',`V', `S'; in addition, the
effect happens when using `C-x C-q' in todo-edit-mode to return to
todo-mode, and also with `g' or RET on an item in a virtual category
(todo-filtered-items-mode) as well as RET on an item in the Fancy Diary
display, both of which also jumpt to a todo-mode buffer.)  These
commands all change point when the todo-mode is returned to, thus
shifting the region.

Another mode susceptible to this problem is info-mode, and there it is
circumvented by the line (if transient-mark-mode (deactivate-mark)) in
Info-goto-node.  The same fix seems to work for todo-mode as well, and
at first I thought it could be almost confined to one function:
todo-category-select, which is called by all the commands that give rise
to the problem except `C-x C-q' in todo-edit-mode when it is used to
finish editing an item, though maybe changing that part of the code to
call todo-category-select wouldn't be a problem.  However, adding that
line to todo-category-select has the side-effect of removing region
highlighting when `i r' is typed, which executes the command to use the
active region as the text of a new todo item, so this is very
undesirable.  I haven't been able to figure out why that happens, so for
the time being I will go with the less elegant solution of calling
deactivate-mark in all the commands that cause the region to shift and
commit this fix to master.

In GNU Emacs 27.0.50 (build 15, x86_64-pc-linux-gnu, GTK+ Version 3.22.28)
 of 2018-08-06 built on rosalinde
Repository revision: bedf905dd37ef8ad45d5912dd230bfe63a1721b3
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Linux From Scratch




Reply sent to Stephen Berman <stephen.berman <at> gmx.net>:
You have taken responsibility. (Tue, 14 Aug 2018 15:59:02 GMT) Full text and rfc822 format available.

Notification sent to Stephen Berman <stephen.berman <at> gmx.net>:
bug acknowledged by developer. (Tue, 14 Aug 2018 15:59:02 GMT) Full text and rfc822 format available.

Message #10 received at 32379-done <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: 32379-done <at> debbugs.gnu.org
Subject: Re: bug#32379: Acknowledgement (27.0.50;
 Todo mode commands can change active region)
Date: Tue, 14 Aug 2018 17:57:18 +0200
Closing.

Steve Berman




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 12 Sep 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 338 days ago.

Previous Next


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