From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dale Sedivec Newsgroups: gmane.emacs.bugs Subject: bug#42513: Python indentation bug when using multi-line on an if-condition Date: Wed, 27 Jan 2021 12:20:32 -0600 Message-ID: References: <20200724114012.7bb27a6d@parabola> <87im7i98q4.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="939"; mail-complaints-to="usenet@ciao.gmane.io" Cc: swedebugia , 42513@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jan 27 19:21:12 2021 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 1l4pRH-00005U-UD for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Jan 2021 19:21:11 +0100 Original-Received: from localhost ([::1]:53124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l4pRG-0004fd-Px for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 27 Jan 2021 13:21:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l4pR8-0004fT-6D for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2021 13:21:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34537) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l4pR7-0005Hf-T9 for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2021 13:21:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l4pR7-0005aJ-N8 for bug-gnu-emacs@gnu.org; Wed, 27 Jan 2021 13:21:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dale Sedivec Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 27 Jan 2021 18:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42513 X-GNU-PR-Package: emacs Original-Received: via spool by 42513-submit@debbugs.gnu.org id=B42513.161177164321419 (code B ref 42513); Wed, 27 Jan 2021 18:21:01 +0000 Original-Received: (at 42513) by debbugs.gnu.org; 27 Jan 2021 18:20:43 +0000 Original-Received: from localhost ([127.0.0.1]:46083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pQo-0005ZP-Oz for submit@debbugs.gnu.org; Wed, 27 Jan 2021 13:20:43 -0500 Original-Received: from mail-io1-f49.google.com ([209.85.166.49]:41939) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4pQm-0005Z9-DZ for 42513@debbugs.gnu.org; Wed, 27 Jan 2021 13:20:41 -0500 Original-Received: by mail-io1-f49.google.com with SMTP id u7so2823692iol.8 for <42513@debbugs.gnu.org>; Wed, 27 Jan 2021 10:20:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codefu-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ITeip90JiE5LWfVvlt64ZM1oZO8C5YniF000fznU6V0=; b=a5HoFFxWvL1/FRPoP2QLHIRUW3N8AtWXQA94QUCm+w1zSB2pf3CRGY6BS0WAjfcNXB jTl6m7+mX4daDPgE+Y8G/TGG4kne5rR4RjPMwfpBY5c0/XR5QYmAFLlZzK3sdCziONZn oCWrylKnq1zNXDSH1X0nS+0QUfwOtTCBhEFcRb5cR9OFweEmfrfPZvLOqSyhJYLvkytv 2VVT1PscvTYUddqfbgr8o9eQVvlu2ygN6xWKjohp6MygJBd6nJ4dduTXi4FHtIM+yCLp VYiH5iENfYEyTDq8gvzdWD3CjvhCXkT7GIhjcBoIxyFVq1YKclPDCoCF3AEegWkMWCg6 ATeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ITeip90JiE5LWfVvlt64ZM1oZO8C5YniF000fznU6V0=; b=T0c7eSesKVJURxTyRRqvlfs0FKYLIHvwmL8xDqMQVQuBtae25/EZ1g7X7phyXYiMJf B8vkT0q59FIFows1gqSw3ehleV82vLhnnm0ER4AFyCbNNkoxtqc9S2I/Y/GbKy1Nrpce zwgz5fKN1V7tjAYn3Fb7kqRKOsvgaD6QQMfQkMPp5/rr/WZmT1jxtpIY+W/50iLCTqGo eSnPGDRD1DpdmQ7jZZ79ygbVFXxupsG/D0y2xImvKaBSHIbLPoA2sqTSQp4G0CtrZlxM qyrvFpXIdoc+3aWd5NJl/KlDgWHqeODAHR2pdsw66RhpPamrmqhwMTHJnamy9Jte1ODg 9kWw== X-Gm-Message-State: AOAM532Louwn5q1jQ/5PX2QRjibceG/1mOV+y02zdafOqyb4Hj63TuNS 8ewu4AMSN0OEUKR8R/Y3ZtbREA== X-Google-Smtp-Source: ABdhPJwLZl+8ytwKoH0pv5XuBBVilVWie5QDHv4W+yVOa9ZIjdJrWDvfjg3Svt+V6EU383X3HPx4OA== X-Received: by 2002:a02:1d0a:: with SMTP id 10mr9832705jaj.122.1611771634715; Wed, 27 Jan 2021 10:20:34 -0800 (PST) Original-Received: from dale.caliginous.net (152.160.30.136.in-addr.arpa. [136.30.160.152]) by smtp.gmail.com with ESMTPSA id n10sm1461405ila.69.2021.01.27.10.20.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jan 2021 10:20:34 -0800 (PST) In-Reply-To: <87im7i98q4.fsf@gnus.org> X-Mailer: Apple Mail (2.3445.104.17) 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:198712 Archived-At: On Jan 27, 2021, at 00:47, Lars Ingebrigtsen wrote: > swedebugia writes: >=20 >> The following code indents correctly: >> def fun(arg): >> if( =20 >> args.suppliername =3D=3D "x"): >> #do something >> else: >> #do something >>=20 >> The following code does not indent correctly: >> def fun(arg): >> if( =20 >> args.suppliername =3D=3D "Messingschlager" or =20 >> args.suppliercodename =3D=3D "MS" >> ): #<- culprit >> #do something >> else: #<- this else is not possible to indent 1 tab >> #do something >=20 > I tried this in Emacs 26.1 and Emacs 28, and both seem to indent the > same, or am I missing something? If I use something other than a comment following the "if" statement = line, I can reproduce the original behavior in a master build from = yesterday. For example, replace "#do something" with "''" (an empty = string) or just "bar". (I am *guessing* the original reporter's code had at least one statement = in the "if" block. It's not valid syntax otherwise.) Dale