From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id IDM9AXkc/GZqqwAAqHPOHw:P1 (envelope-from ) for ; Tue, 01 Oct 2024 15:59:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id IDM9AXkc/GZqqwAAqHPOHw (envelope-from ) for ; Tue, 01 Oct 2024 17:59:53 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=MSps5QCC; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727798392; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=NjBlOiKY5kJDWpj6QqhuuhWSFuxb+lRbqxJ7nOs5/Js=; b=IJgziN+cNsPyDi3Xkm2bMn5t8vDtJLAB8XaIneCq9HJn6TgsAZH2k0iwY8ZeVd8hkXUUdU +h4Nbvf5Dz4Ej03WkQDKS6YGuy26Q+YHR6wvdYS/+gD6biCvdfARV1j7Yvf9podSTLkz9U qCukR/RBLMr5l9bQuQ0DCnUqWyO0g8Cj0Ufer1xVPHrEohygAYNyxkWJcqJZfx9VipsXZ0 6Qbz9IQ2K0FkccbtR5nXU2TMuKscRpcr0nAY0yA2ejOZO4owAAkaXjXZmgqyPPd2X6XM64 lMGua90Jm6CZyjKrCezi8M+d2H8bGbPNdRdiAMYr78D1bTxkPBNExue1qpLJQw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=MSps5QCC; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=outlook.com ARC-Seal: i=2; s=key1; d=yhetil.org; t=1727798392; a=rsa-sha256; cv=pass; b=mn9uQLfM8hvk1GL5NqcAgmSBbgjZsRNW0BRhJByyWbXLXN89BfC6V0WxL2ESlBrCT3fxKw /LGhGrp+/g4WjYmI86PZFVCBqZyrb3hG4Uyve+sNTP5fWPzdRby08N2vZgnmfV/DfmkaQB 7QihyHxqH1ea/sx2b7Y/S8zU7bKfFSAGlZ2grHQoSYVT9y84RMSlxLuXGG2SFT/E131ngY x+8wvPeCmXsulYE0wsI7W+NajsNrJ9n0ZHGnnPVDwYkAp1Vf6jan9FkVqTLBE7A43gLZeW VW1UQ+oK/jzYT7ha/5+vv189Qfriv4NGZZbbeAVHuaUjelgBiJs+5c6Rg+dgRQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 937067CE7B for ; Tue, 01 Oct 2024 17:59:52 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svevO-0006Nx-82; Tue, 01 Oct 2024 11:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svFnq-0007wl-D0 for emacs-orgmode@gnu.org; Mon, 30 Sep 2024 08:47:02 -0400 Received: from mail-japanwestazolkn19010005.outbound.protection.outlook.com ([52.103.66.5] helo=OS0P286CU011.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svFno-0005sj-4k for emacs-orgmode@gnu.org; Mon, 30 Sep 2024 08:47:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=upU92MRy0JScYwA4KuQdIgcQzVkTC8m94KRPfLgaPePSkSsrQ0y/gf0gmgkeqeLYVw9LyOzU+/QOHdPU4Wcs7G4Sm3QIZwPYKUuL+tJRulV8XzjvSyYRR56eK5BAGBxmRIej3ci3MmIQ83A1yRSTajxLWilxa98SD0HbuqGMF87Lor8YiCbCjksGvZT7zM8CAPrMos7D0RsWwNdt8ocTi7DHcSc86NVN9oTG+ebm2wwFPLwfF41xp14ljui7GdImIxGexWkTE+MyUxy/lGos3puR3xAijtod94s1A3ryFoCu9WGlxZ8kOAjtn7rgnpW2xVHlmotJ2PDkYw1H7BZOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NjBlOiKY5kJDWpj6QqhuuhWSFuxb+lRbqxJ7nOs5/Js=; b=gfkm5Uc6UDcYAv0cq2URe1T3CkU3p0I5bB1VkcajE4B/n4VYz/Kx59Yg9UiGHAtx4dOpBy1MpEDal6XWs4PeeaYybZwvV7wuk20qJIJmjXsE9u0aMO3ARX9HqQW403Y/OLNHBO1DRwwF3ENOFOazu2kGRM3obJWFpPVsCW56ICE1CFXcwmAv21zBeAXaQMW7MCSsX60hIXFXDQQrJZviuYENqrBykEDSB/n161ooA+p1On1FP2ZuhobW2mt8hLxQRep7Vj0ADQCY74KCyQy3OUfIFXUBnVlfFdzhPeeE/4geVLGxXZk7L3nUOQdtPnuokAy0TdnMhCe2BjAzlEy5Pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NjBlOiKY5kJDWpj6QqhuuhWSFuxb+lRbqxJ7nOs5/Js=; b=MSps5QCCXHuzmt4P1lptYeokd514KQlSpHIMu4Xfq4cwYxV2GrdtEJbq8YWXT+0f9umqawOnD91mIp3mlzDJeVjTgQ0HfqmynXZ/v2j55oYAqS+ol9zmAePo5d51JkAXzvf0jQZWcXbXusbpUuPLcsj3g+SOzl4FDjIiBRvgl//WiGOwkSk9tEoIC8ssfqSCQiKCtESiDTENKGmzDmKIIsnWxqeT5s2OOoLF/Bj07aSlPOSt6fT2TogoRHjvQbtORFhy4FAlIACUpCjyWwvQRpgaE8qEElKDhHw0PafaASN3rSDPhB5qGssgSsFuIB+/ZPIG3fLz6ypIIvL/2qzcXg== Received: from OSZPR01MB8704.jpnprd01.prod.outlook.com (2603:1096:604:15d::7) by TYCPR01MB6334.jpnprd01.prod.outlook.com (2603:1096:400:7c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 12:41:54 +0000 Received: from OSZPR01MB8704.jpnprd01.prod.outlook.com ([fe80::e0ac:399f:3236:ddf8]) by OSZPR01MB8704.jpnprd01.prod.outlook.com ([fe80::e0ac:399f:3236:ddf8%3]) with mapi id 15.20.8005.024; Mon, 30 Sep 2024 12:41:54 +0000 Message-ID: Date: Mon, 30 Sep 2024 20:41:47 +0800 User-Agent: Mozilla Thunderbird To: jschmidt4gnu@vodafonemail.de Cc: emacs-orgmode@gnu.org References: Subject: Re: [BUG] org-comment-dwim does not work with temporary Transient Mark mode [9.7-pre (release_9.6.10-902-g41ff56 @ /home/jschmidt/work/org-mode/lisp/)] Content-Language: en-US From: Steven Lin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR03CA0268.namprd03.prod.outlook.com (2603:10b6:a03:3a0::33) To OSZPR01MB8704.jpnprd01.prod.outlook.com (2603:1096:604:15d::7) X-Microsoft-Original-Message-ID: <7fa894fb-9386-499e-905c-136bbc3be56b@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: OSZPR01MB8704:EE_|TYCPR01MB6334:EE_ X-MS-Office365-Filtering-Correlation-Id: f3374844-7e3d-4556-e23c-08dce14d4369 X-Microsoft-Antispam: BCL:0; ARA:14566002|5072599009|8060799006|19110799003|7092599003|15080799006|6090799003|461199028|440099028|3412199025; X-Microsoft-Antispam-Message-Info: +Q3gJR7xY7aZ1PXB6ufTXhZvqUiDXONpxjCHs/nAWQStJcqf2yHZ/QEZMqvvul+D51c4qlfIYm/ROZbKk4hCqNPVX4X1B9x/E1+XJpxg8cKhqQw1m6BRnA4AOAsh4IbB373cJT7bwBRGv9TlYfpXD7cnJ8OmV6k8qfgJCQncxfN+1TUN8yRLewFPYa45vXxvKqRIzHbecPoY3U+SJMJADX0LQ+3w72Qi4c82eJBu2Qb8GjdDQERrLgILoYTL01M23ZL52i093orZBMesTpVlNH3Xx5oDQxNm03tNi0T1dEGbs7o3HbO8lIQ3P3EOI7RWkUVRsjs088EVl57lb9E5fPTB0Vkuznn4wOidUA+MU/tFSfYJ0sPMnk2Xp1M8b0IqZazO8TAwZCsvpPsvNaFLb/4u/lJNH22Vx8RJW5u9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VkajhqVlVIM2dWbU54RzhtUHZMUXhINU9M?= =?utf-8?B?Yk0xbGkzWUpBYTZRTlhlWFltZmp1ejN4Nk91dC8zRGVPYzJiMWhwMmI4T0Jm?= =?utf-8?B?L1VzZXRBelNMMEI2ZWc5Y1p5bFd5S1NTTDhXamtZR3lsRzFkM1ZIc3NwZFhr?= =?utf-8?B?bmpMMGFLM0NxV2dpSzR5MHF3MFlkUXdBS3NTOGdmUWZOdklTTlpmWk1abzl6?= =?utf-8?B?Mi9DOU1KcmlBVko3bVQzakFDS25JblRCd3RPdnh2VU9rQ0dhMmk3OC9HUXg4?= =?utf-8?Q?5ZxjhLpERQ0qCQtomzwu?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3374844-7e3d-4556-e23c-08dce14d4369 X-MS-Exchange-CrossTenant-AuthSource: OSZPR01MB8704.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 12:41:54.1499 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6334 Received-SPF: pass client-ip=52.103.66.5; envelope-from=linjt267@outlook.com; helo=OS0P286CU011.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 01 Oct 2024 11:36:17 -0400 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.89 X-Spam-Score: -2.89 X-Migadu-Queue-Id: 937067CE7B X-Migadu-Scanner: mx13.migadu.com X-TUID: 4fSS7hoOZbSp I found that current bugfix (commit 1014296344a75fa08e0a8814e4fbbd767e7eba4c) brought new bugs. Step to reproduce: 1. Set these variables. (setq org-src-content-indentation 4) (setq org-src-preserve-indentation nil) 2. Try to comment some lines in a source block. For example, line foo and bar. #+begin_src emacs-lisp     (setq foo 1)     (setq bar 2)     (setq buz 3) #+end_src Expected: #+begin_src emacs-lisp     ;; (setq foo 1)     ;; (setq bar 2)     (setq buz 3) #+end_src Got: #+begin_src emacs-lisp     ;; (setq foo 1)     ;; (setq bar 2)     ;; (setq bu           z 3) #+end_src Then I found that there is a problem in function `org-comment-or-uncomment-region` in lisp/org.el. in func `org-comment-or-uncomment-region` : #+begin_src emacs-lisp (let ((offset (- end beg)))     (save-excursion       (goto-char beg)       (org-babel-do-in-edit-buffer        (comment-or-uncomment-region (point) (+ offset (point)))))) #+end_src the value of `offset` is wrong, it became `Expected_Value + Org_Src_Indent * Lines_To_Comment`, in the example which is 8 chars more than expected. Thanks.