From unknown Fri Aug 15 21:25:17 2025 X-Loop: help-debbugs@gnu.org Subject: bug#32379: 27.0.50; Todo mode commands can change active region 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: To: 32379@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.153359144511753 (code B ref -1); Mon, 06 Aug 2018 21:38:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Aug 2018 21:37:25 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 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 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 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 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 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 From: Stephen Berman Date: Mon, 06 Aug 2018 23:37:08 +0200 Message-ID: <871sbb9ny3.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/OLGBN yVaFlja 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) 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 From unknown Fri Aug 15 21:25:17 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stephen Berman Subject: bug#32379: closed (Re: bug#32379: Acknowledgement (27.0.50; Todo mode commands can change active region)) Message-ID: References: <87600d7xgh.fsf@gmx.net> <871sbb9ny3.fsf@gmx.net> X-Gnu-PR-Message: they-closed 32379 X-Gnu-PR-Package: emacs Reply-To: 32379@debbugs.gnu.org Date: Tue, 14 Aug 2018 15:59:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1534262342-30296-1" This is a multi-part message in MIME format... ------------=_1534262342-30296-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #32379: 27.0.50; Todo mode commands can change active region which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 32379@debbugs.gnu.org. --=20 32379: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D32379 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1534262342-30296-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 32379-done) by debbugs.gnu.org; 14 Aug 2018 15:58:24 +0000 Received: from localhost ([127.0.0.1]:50991 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpbhv-0007r8-B7 for submit@debbugs.gnu.org; Tue, 14 Aug 2018 11:58:22 -0400 Received: from mout.gmx.net ([212.227.15.15]:52995) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fpbhU-0007qQ-Vd for 32379-done@debbugs.gnu.org; Tue, 14 Aug 2018 11:57:56 -0400 Received: from rosalinde ([188.101.22.163]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LqRKT-1gKWWk1F5d-00e0nL for <32379-done@debbugs.gnu.org>; Tue, 14 Aug 2018 17:57:19 +0200 From: Stephen Berman To: 32379-done@debbugs.gnu.org Subject: Re: bug#32379: Acknowledgement (27.0.50; Todo mode commands can change active region) References: <871sbb9ny3.fsf@gmx.net> Date: Tue, 14 Aug 2018 17:57:18 +0200 In-Reply-To: (GNU bug Tracking System's message of "Mon, 06 Aug 2018 21:38:02 +0000") Message-ID: <87600d7xgh.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:rrBB1C03WSo4RftfGCDD82LbaDdtD6kFVE2cPkD0vsq3wkJQduP eCMO2wLYYLaWE/PzzmoKlITcsno/WdYWtzFu4o3SE0ifFkfgOcQBZXNnMXC5yQuAwwFDw/X ztEk2m0UR/LLRYgFhS+Ywz+ITaTYiZ8b8kSmMVm4yBpH6DckvohfMeiRhATw8XMMpF+qmxR YsKSbPpCv+iLwRB9CPVyg== X-UI-Out-Filterresults: notjunk:1;V01:K0:YkwNhptg9z4=:nLyNx/bgaLuQ485IJzRZ3g rGay9FiI0gJJinvA8tNzgaIVmYb7c5eTyQGsZyiOq7EGQK0KVnJB48BvQsozuyGzJJY7VAWmm 0Nia/im1X8SZQwjjyAijNtiHKHfp+XGLwpWxGPNhxjSZfEplqYs2BP0Ix74XD48VhcsL7Gvsj +ffw/R1FqwN1lpYajxmIQeMFUVmxa9pjHLQ37Fz9aOqmatb8xaXnXzYelGa6L1yq4fYfZuLAR WbLYpImf1KYqewAh3HAaxDS+1hr6fq9TMPGChzpRTcU7KY6grjIFSOD5GBoSXGi7+ZZYk2yPP YWeplyxzvmgrSh2xvhTJTWDcWVBj3h7xQ12EokCBshonP2z/qgrlMafAmSXcr0nz0lMJcokfq rsyfThyE2YZ6euKG5emDJMyeDh4yD7WYy8t+uTJ6MLnXvPJUqSipO/wVqF6/cbymGe+zDgxhV 6MrwbZAVhJy0w0BrvVvTtY9EieX+pxtus0b3cTi4ooYshMwYMewquFkCm0sIu7s4Sgskh+czw zcbEKdZlqZ1cc6/JccGQl+HorLjVDoutX9LMQ9MoLUlb9YPTeCeGZPu3BsC2APj6t9krxgiYb fIfIDVGsNxWuxtlC6byMtSUFRTqVkZOm9MA2ZhVxBBhFxC0IO2lGtRJWda3eUblK6B4FLRZpg fkDcFUvxFZ6/SBC3eCGzkjlpMcI+5ggTYWJsbgEXRNivooBhZsrBKHoKT3N8KKX9OQc+wHg4+ GRvrPU89JnY6AiZ6WW43z6reA8t9FotUaLI3uvUSpkH3qht/tDUllQZ+8QL94IF0M0rvfQKf3 I/eU3JL X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32379-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Closing. Steve Berman ------------=_1534262342-30296-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 6 Aug 2018 21:37:25 +0000 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 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 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 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 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 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 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 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 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/OLGBN yVaFlja 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-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) 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 ------------=_1534262342-30296-1--