From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#32379: 27.0.50; Todo mode commands can change active region Date: Mon, 06 Aug 2018 23:37:08 +0200 Message-ID: <871sbb9ny3.fsf@gmx.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1533591370 11009 195.159.176.226 (6 Aug 2018 21:36:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2018 21:36:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 32379@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 23:36:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmnAb-0002kt-3o for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 23:36:05 +0200 Original-Received: from localhost ([::1]:36397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmnCh-0001jz-GQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2018 17:38:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmnCY-0001io-M5 for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmnCU-0002DP-PE for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:38:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmnCU-0002Cz-Ju for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fmnCU-00034W-Cn for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2018 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32379 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153359144511753 (code B ref -1); Mon, 06 Aug 2018 21:38:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Aug 2018 21:37:25 +0000 Original-Received: from localhost ([127.0.0.1]:42958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmnBs-00033U-TI for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:37:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fmnBr-00033G-5y for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:37:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmnBk-0001U9-U6 for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:37:18 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36173) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fmnBk-0001Ty-Pc for submit@debbugs.gnu.org; Mon, 06 Aug 2018 17:37:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fmnBj-0000pl-Kf for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:37:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fmnBf-0001NG-ME for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:37:15 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:46623) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fmnBf-0001Kj-Bx for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2018 17:37:11 -0400 Original-Received: from rosalinde ([178.6.151.192]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LqV4f-1gQVam2ajh-00e5Us for ; Mon, 06 Aug 2018 23:37:09 +0200 X-Provags-ID: V03:K1:lM9wERO4Kl8NUWxnTVMeLJ9/oNbKaz0AOzjv88ONdR155+O58qY 09RFV8k5b2VQJ8u5AMCI1dDSjeHzaAPzW6JBbTrQdFEBq9LU+pOJoYZ2f/AtnyxEVgNLYPY MqcbTE8um776glbOG7C0lSZsJoEdd/geymfS4nSiesMkCe8FPr6bwgFEkOhTQCSrZ7FzZ2+ 34rPYD6kERKwQqPkMIrTw== X-UI-Out-Filterresults: notjunk:1;V01:K0:raqTjCwrijY=:2m58AyOkGTXO5YkveODxuz ttPGLnKz9w6XlNrQUwsLDSxUQFtDQM9UdN8b7xxWN2JvEyOYU8hVx4FcGSQ5vrznZ9zpIFQOs LeDY7D82Pgusdqd7sYhVJ5pgW3MSxvnCsggexmFcSMrEDMEi3IOynWpiIWNXeKP7yGiVLxT3b SgESnNT7N+fNLyOHdZF1+FQuygoJozyy/ootPeEP2KTsqLIogkan6cIroRqhrLeRNN6TkzYVu ebD5Iu+e5Kjztj73DhXN+YzXs7iQu+Nfmm05wTDItwu8/AE2DsSfgYUJLVbDsSItJ+b865kB/ qofkztu730v2Q72pc7Ri1TKuEaG3Ky07Y/5Y1sIUv5WbKkvEVG4yo/B9+ohWyfOTUciTRGbae 4VOSC0XBm6c4RcNcoDG75FwVTFS0uumx/O+nZzPfQYfxKtZYkKwagcew3G5yi9Y/jZIiaDalW vPUx1848xu4O9c8XcE5jscAQizcb0dDEOc2retWr25D5HkDxUjhIKmDlNmz/ysYJPoT8m6EE3 ME4wyyzK04Vt+As5q5yjZiBXYcEjuNH88r25+7/nCivYuHSOwgStJIgbrwK1YABk72oFe0hN4 khoNQBpgUFkcrHpcWfJlJtoWBgY8IjZrWZsYA8mygqJP1PjUfWHNxcAzWGAwwo9H5VBdKSAqD 16CPXOSOYnrI6JC0XPgsUu281RScj3b742IYOQF3B0nb6RIEQQNhgfe/m5fCqGn7owcPcq7RB atEmCvPDwudpuPpnBy+WFHDnXnqXYX8tQuKL49wjVbfFJB2FLe4coOXtVwdcdw6HXRk/OLGB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:149296 Archived-At: 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