From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#57551: 29.0.50; hide-show in python-mode selects the current block imperfectly Date: Mon, 5 Sep 2022 11:42:53 +0200 Message-ID: <18fb0537-3fcb-8d14-6680-ef56d30dcbf0@easy-emacs.de> References: <87zgfhtqng.fsf@secretsauce.net> <87tu5ms1mu.fsf@secretsauce.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21074"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: 57551@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 05 11:44:12 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oV8eJ-0005My-Tg for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 11:44:11 +0200 Original-Received: from localhost ([::1]:38140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oV8eI-0003RF-7Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Sep 2022 05:44:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV8eA-0003Qr-4V for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 05:44:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57761) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oV8e9-00084h-SP for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 05:44:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oV8e9-0007Cu-Mn for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 05:44:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Sep 2022 09:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57551 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166237098427632 (code B ref -1); Mon, 05 Sep 2022 09:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Sep 2022 09:43:04 +0000 Original-Received: from localhost ([127.0.0.1]:46460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oV8dE-0007Bc-3I for submit@debbugs.gnu.org; Mon, 05 Sep 2022 05:43:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oV8dC-0007BU-ON for submit@debbugs.gnu.org; Mon, 05 Sep 2022 05:43:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV8dC-0003IB-D5 for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 05:43:02 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:32833) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oV8dA-0007q3-JP for bug-gnu-emacs@gnu.org; Mon, 05 Sep 2022 05:43:02 -0400 Original-Received: from [192.168.178.61] ([89.247.171.232]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MfYgC-1p21X40IYK-00fyZC; Mon, 05 Sep 2022 11:42:54 +0200 Content-Language: en-US In-Reply-To: <87tu5ms1mu.fsf@secretsauce.net> X-Provags-ID: V03:K1:OIPvgCSCpDs2KdRlFevAT9HMebvKGb0pUjoFm/56oqAgD9iuI30 edyPxrrXatltfRiSKtgU+bfrBjduXY3V75MkzaFtl1/egSmMy1Kv2PCCXnUes6AorAI3BIE ApzJLG/wtD1SnIWdl7NTs+mAtA6VYLgONG9BT00O0hd1ChQTMcKjCt1+aKe84NByLP2Gkjq kdDylUiVHjIS3vSOtvI1A== X-UI-Out-Filterresults: notjunk:1;V03:K0:E6htBQ7Oqww=:wcS/+Xh8UYrHumX5NNCPtb Vc1cATJ+OFmMjkO2g5WR/S2PpUuiKekjIWR1uyTwrtojS6hlbVAmMkvKM1LkiyPmH9Vm5ZToC Nkkp3AW/VsF3PqxeTV35fgFV6q2DLaDG1dgCZzA1OPYlN27WVK9WBDnwAtwhcz7ZPfMy8MLUu EvonPtiG44bP6Vj/vbfs5LmWWJ9SOWssdSpv50hhehwatskiuvFzMvrMyBrHoxmTyVb53Zd6N uEe/MezncWl8WNVC2yJtIDhcQRx5933s1wqXOtgUbowQ7MXWjzOfE8+MOgPoAAt9AHR9d/AtW wsIbLKV/+LZsPW2vHfGetiWd7aGfETpnZQNKlMtnhuujdLXZ2rEum+OSrDYCBJoX5rz0Yrufv NiZgzBVaMl9YBLvmtLVFdfTGhS6X1Dj14y8HBO2OWP/Y7m248RcNhWIxTz6bPuq3T0kMmtu62 1THCVE99UXK7/1X+ZgSoNfsPJdxZKdbKRaZ2JCk2D9bRM47oNjSakK+ZHRYMlApV1gHl8RZlN qTOiIBKC2Nd1PNESsJabvdGg+VL7hd+zgtfWBkywEvldn/0H8cqiCn6BXzVKtVTUtHBp0/JCQ q4+WYUJVkVYkObu5DU8lBmHRat9hUP1sL+RvdgGsuow5EImpBx02mK8Rv7tvV7pPGHcm2IvfA 5vo3KLk2KQfz3/ea75q+O9LrlM+GzNvGnRR/rLJj49nrYWESBNBvvkpwFFQaPIgQhqCoyUQJh 0oU+VLWa1houGN077fpKD93EmrDSiLRQVtBFcW4MIRk9pa4F1fwpdFtZ8Zg1vxZXrHOTZeAA Received-SPF: none client-ip=212.227.126.133; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.978, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:241542 Archived-At: Am 05.09.22 um 09:44 schrieb Dima Kogan: > Hi. Thanks for the analysis. I guess this isn't the right forum for this > discussion, but I'll put it here anyway. The reason I think the "if" and > "else" text and the preceding whitespace should be considered to lie > outside their block is that this is how cc-mode works. Consider the > C code equivalent to the Python code in the bug report: > > void f(void) > { > if(1) > { > 11; > } > else if(2) > { > 22; > } > else if(3) > { > 33; > } > else if(4) > { > 44; > } > else > { > 5; > } > > return 0; > } > > Here (hs-hide-block) hides the if/else blocks ONLY if the point is > inside the {}. Otherwise, the whole f() is hidden. > > > There is another point: might be more than one if-statement in a function. If the whole function-body is collapsed from just one statement, the others are invisible too.