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#45897: [PATCH] 27.1; python mode font-lock confused by string concatenation Date: Sun, 21 Jan 2024 16:39:43 +0900 Message-ID: References: Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35261"; 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: 45897@debbugs.gnu.org, Eli Zaretskii To: Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 21 08:40:24 2024 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 1rRSRM-00093H-6y for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jan 2024 08:40:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRSQy-0001W7-Sr; Sun, 21 Jan 2024 02:40:00 -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 1rRSQx-0001Vb-JM for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 02:39:59 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRSQx-0001li-6P for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 02:39:59 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rRSR0-00067H-Ee for bug-gnu-emacs@gnu.org; Sun, 21 Jan 2024 02:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jan 2024 07:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45897 X-GNU-PR-Package: emacs Original-Received: via spool by 45897-submit@debbugs.gnu.org id=B45897.170582279223488 (code B ref 45897); Sun, 21 Jan 2024 07:40:02 +0000 Original-Received: (at 45897) by debbugs.gnu.org; 21 Jan 2024 07:39:52 +0000 Original-Received: from localhost ([127.0.0.1]:36457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSQq-00066l-Fw for submit@debbugs.gnu.org; Sun, 21 Jan 2024 02:39:52 -0500 Original-Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]:46165) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rRSQo-00066W-4c for 45897@debbugs.gnu.org; Sun, 21 Jan 2024 02:39:50 -0500 Original-Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-7bf2c826a5aso145478239f.0 for <45897@debbugs.gnu.org>; Sat, 20 Jan 2024 23:39:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705822781; x=1706427581; darn=debbugs.gnu.org; h=content-transfer-encoding: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=BOWEbu0gL2e2OGqEZTPojeHRHpN9N7DDlNPcc+f6sm0=; b=IhJyTx2yrXm2XWcmOx7aJSV71vyhamjnwregp0lwFkJ7lucE6Xc2sBtVLP3Wwiw5oi QxS0jS/3396G3a3xdI7pyEK89qxen7GjKwYlaZsVS7nJFUd2WTgy09ptJfbs3Y9UPyn7 ae5ANPnJOhqqwkTJnhkSBSHHZfcI2/jjtVYknmiAOZ8dHLVJo76R7Iu+3Be5TKBqavZ2 FuOMJ2VpIATcRDZFFP12hpjU9yd4wzaOedwJmvdY8qn9KQUoSyGEZ6WXWkhotGJUgtYy X6miocLIm79cF7DOvNeSo54oMPmOGr/eVulSF8zj0++fUKICeaki75VWUR7ZSF+B1SrQ UMVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705822781; x=1706427581; h=content-transfer-encoding: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=BOWEbu0gL2e2OGqEZTPojeHRHpN9N7DDlNPcc+f6sm0=; b=WYwwuKizGQ4yrD9KDlLE603vxGbJTuaY/EKorgSCApaYZa6P0dvihSSOS6zzJtcYjT bFzsTn1q38FzmWu05mYg0FgOPjmSRqCQMrCYrL8tfinfq6n6uUhVZyv1gzDF07hbKT/+ Y5CmeSWyatm4NwEYziNt6lckQlJIfH8uXrZfxi3UrxGxWqzXQPhF3SwDMMPCnMMitClb 4xKtPUB6eOYNfvVjP2IooCBJ1x27cNDsyCTAi+4hgl3TL5Hu2f6MXXLlzrZ2S7mqpPeX WUEIXam+TIuDz7677v6wVlLOORjKl5Y6LvczDNWjSIOZrWPOqqLjtVbmEvyeesBUoM7c 4cIA== X-Gm-Message-State: AOJu0YyCP1wNzJKdshQ0viHSOsT1DKEViKDPp7b6cwsfmUptwNKr2aov 5DAejvE/9jRnUOqnCCHFYra3q2kuv/a84tsZ44Lcm+Z+FQRkiwcR X-Google-Smtp-Source: AGHT+IG+qkBjAelazbHyhLt3Wxbhqd0n+ws0kKWpGJp9oFV6/sl+zLctqYtWD+NRGiGobrQh10m4Mg== X-Received: by 2002:a05:6602:2bc1:b0:7bf:8d27:1567 with SMTP id s1-20020a0566022bc100b007bf8d271567mr2514612iov.8.1705822780998; Sat, 20 Jan 2024 23:39:40 -0800 (PST) Original-Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id i191-20020a6387c8000000b005ced88aa031sm6164286pge.48.2024.01.20.23.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 23:39:40 -0800 (PST) In-Reply-To: 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:278651 Archived-At: Jakub Je=E8m=EDnek wrote: > kobarity writes: >=20 > > Thank you for the patch. I tried it and confirmed that the example > > shown by Tom Tromey is fixed. > > > > I think ppss and line-ppss would be the same in this example. Can you > > give an example of a case where ppss and line-ppss are different? >=20 > Well, it would be different in case like this: >=20 > #+BEGIN_SRC python > " # <- forgotten quote > a =3D "abc""" > #+END_SRC >=20 > `ppss' would in the context of `python-syntax-stringify' evaluate to > '(0 nil 8 nil nil nil 0 nil nil nil nil), while `line-ppss' to > '(0 nil 5 34 nil nil 0 nil 7 nil nil). Note the 3rd and 8th > element. Here's the snippet to test it: >=20 > #+BEGIN_SRC emacs-lisp > (with-temp-buffer > (insert "\" > a =3D \"abc\"\"\"") > (backward-char 3) > (syntax-ppss) > (parse-partial-sexp (line-beginning-position) (point))) > #+END_SRC >=20 > I was thinking that we want to consider only cases where the quote is on > the same line but I guess I wanted to solve a problem we don't > have. I've revised the patch to be more simple, please see attached. >=20 > > I noticed an error in the commit-msg hook when applying the patch. > > CONTRIBUTE states the following: > > > > - Lines in ChangeLog entries should preferably be not longer than 63 > > characters, and must not exceed 78 characters, unless they consist > > of a single word of at most 140 characters; this 78/140 limit is > > enforced by a commit hook. >=20 > Thanks, fixed. >=20 > > Also, the indentation still looks wrong to me. It might be better to > > attach the patch instead of pasting it into the body of the mail. >=20 > Please see attached. >=20 > > Attached is a patch to add an ERT that identifies this issue. Please > > add it to your patch if you like. >=20 > Thanks, I've added it to my patch and added 'Co-authored-by:' to commit > description. Thank you. The revised patch looks good to me.