From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: kobarity Newsgroups: gmane.emacs.bugs Subject: bug#62092: 30.0.50; "case" does not work as dedenter in Python Date: Sat, 11 Mar 2023 11:08:32 +0900 Message-ID: References: <48fd0271-45d4-4f8e-0e13-f344f2fe1a31@yandex.ru> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13387"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.0.50 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Lele Gaifax , 62092@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 11 03:09:40 2023 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 1paog0-0003O2-5x for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Mar 2023 03:09:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1paofm-0008Q4-EN; Fri, 10 Mar 2023 21:09:26 -0500 Original-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 1paofk-0008Pj-0R for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:09:24 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1paofO-0005WX-Ho for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:09:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1paofO-0004GA-CO for bug-gnu-emacs@gnu.org; Fri, 10 Mar 2023 21:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Mar 2023 02:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62092 X-GNU-PR-Package: emacs Original-Received: via spool by 62092-submit@debbugs.gnu.org id=B62092.167850052316349 (code B ref 62092); Sat, 11 Mar 2023 02:09:02 +0000 Original-Received: (at 62092) by debbugs.gnu.org; 11 Mar 2023 02:08:43 +0000 Original-Received: from localhost ([127.0.0.1]:56317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paof5-0004Fd-GV for submit@debbugs.gnu.org; Fri, 10 Mar 2023 21:08:43 -0500 Original-Received: from mail-pl1-f180.google.com ([209.85.214.180]:42822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paof3-0004FQ-J5 for 62092@debbugs.gnu.org; Fri, 10 Mar 2023 21:08:42 -0500 Original-Received: by mail-pl1-f180.google.com with SMTP id i10so7508156plr.9 for <62092@debbugs.gnu.org>; Fri, 10 Mar 2023 18:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678500516; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:from:to:cc:subject:date:message-id:reply-to; bh=kcyAOAXnC/jpD6cMddVvYBp7fkrtsAS445oTcZrt4bQ=; b=oE2gSH+pUSN75fM5PhJX6611rGHW4dKGVXFYa9HUcrBtXCniHCXs/IdnjanTfls+Qs 91D5oM43K1lkNYrLTY+6zRo8W1Yy+mEQF1W4nHEQJcmC1BJcUZ/CXx9p2TuqkLni1jKu 9b5ONrb2VY+Cq+ynk5c1kN3tUwoa+vXgMBvkAkx3usRd8c4p0fCUKqLQByt0nNYpLoOX 8l88KCjGmL5NiRaWTJgvKaEpHOn5z/tHXRiASIFZ/isjXoRXuvHN+wqnnZE+vUI5n9iX iSJbHX8SeYh+Z8ys3nH/ZE+DQaSmMyYktxiJqR2TjwmOFDDz1ADk5vi12ooviQgZ9bHm Z1uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678500516; h=mime-version:user-agent:references:in-reply-to:subject:cc:to:from :message-id:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kcyAOAXnC/jpD6cMddVvYBp7fkrtsAS445oTcZrt4bQ=; b=Z6o/oShcQhHpsc7HTJv1FIDIXS/BYZr3/aNOsnzosYAdTcSsBt1OOX3tOrsbWmPQxO MeYFPXuEouU54lTiwBh9MkNKDOrwx+SiWp1ha11nFvFhDa0DdiL1zQZme+Dr8hrTobiq vFfktCggHSdFJG12sfOBz9/Yl7sFEvTT6O4drVnAvM9XEljEBXZyZNr/jG9dHZDwyTTm CWO3k140G94G/HR8l437n3xLNErHWrOSFwKlvyjXGG7sVYA8yo3uOThMfumyctCxNrF0 aReiA4s8X2+igVY6emmdkFdCToz9rbfqV1tjACPgVgy2qliUMH+K8vsymDmItVB+QZ8u v12w== X-Gm-Message-State: AO0yUKV+mslJr0jTdwd8zPiZS98VKalixHxQNb0UwTXzF1do3Myq8zH9 N1sAy/xUv94ATr1zWI9m2W0= X-Google-Smtp-Source: AK7set95BKjER5c15kaYLoJ1N4nOOPLRPTRl5YtPfeV529iD+06J7qQs7/yhSJ9EZUrT9FZwz9RzUg== X-Received: by 2002:a05:6a20:6a9e:b0:cc:f047:afaf with SMTP id bi30-20020a056a206a9e00b000ccf047afafmr23736062pzb.11.1678500515667; Fri, 10 Mar 2023 18:08:35 -0800 (PST) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id a5-20020a656405000000b00502f017657dsm481174pgv.83.2023.03.10.18.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 18:08:35 -0800 (PST) In-Reply-To: <48fd0271-45d4-4f8e-0e13-f344f2fe1a31@yandex.ru> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257742 Archived-At: Dmitry Gutov wrote: > I type the colon after 'case 2', see it indented correctly, but also a > message in the echo area: > > Closes case 1: > > I type the next case with colon and see: > > Closes case 2: > > and so on. They don't do much harm, but they still seem semantically > incorrect. Thank you for testing my patch. I don't think this is a incorrect message. Let's discuss with the following code: #+begin_src python match a: case 1: print("a = 1") match b: case 2: print("b = 2") case 3 #+end_src When I type ":" at the last line after "case 3", it will be indented as follows: #+begin_src python match a: case 1: print("a = 1") match b: case 2: print("b = 2") case 3: #+end_src The message "Closes case 2:" is shown. It means that the "case 3:" corresponds to the "case 2:" in the inner "match" statement, not the "case 1:" in the outer "match" statement. When I type TAB twice, the line will be indented as follows: #+begin_src python match a: case 1: print("a = 1") match b: case 2: print("b = 2") case 3: #+end_src The message "Closes case 1:" is shown. It is shown to help distinguishing nested blocks, although it will not be useful if the case statements are same. This is the same behavior as "if" blocks, etc. The term "Closes" may not be the most appropriate for "case," but I don't think it is wrong.