all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32379: 27.0.50; Todo mode commands can change active region
@ 2018-08-06 21:37 Stephen Berman
       [not found] ` <handler.32379.B.153359144511753.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Berman @ 2018-08-06 21:37 UTC (permalink / raw
  To: 32379

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#32379: Acknowledgement (27.0.50; Todo mode commands can change active region)
       [not found] ` <handler.32379.B.153359144511753.ack@debbugs.gnu.org>
@ 2018-08-14 15:57   ` Stephen Berman
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Berman @ 2018-08-14 15:57 UTC (permalink / raw
  To: 32379-done

Closing.

Steve Berman





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-14 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-06 21:37 bug#32379: 27.0.50; Todo mode commands can change active region Stephen Berman
     [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

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.