From: Stephen Berman <stephen.berman@gmx.net>
To: 32379@debbugs.gnu.org
Subject: bug#32379: 27.0.50; Todo mode commands can change active region
Date: Mon, 06 Aug 2018 23:37:08 +0200 [thread overview]
Message-ID: <871sbb9ny3.fsf@gmx.net> (raw)
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
next reply other threads:[~2018-08-06 21:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 21:37 Stephen Berman [this message]
[not found] ` <handler.32379.B.153359144511753.ack@debbugs.gnu.org>
2018-08-14 15:57 ` bug#32379: Acknowledgement (27.0.50; Todo mode commands can change active region) Stephen Berman
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=871sbb9ny3.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=32379@debbugs.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.