From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#68284: [PATCH] Fix python-info-docstring-p bug in the 2nd line of a buffer Date: Sat, 13 Jan 2024 11:34:38 +0200 Message-ID: <83edelh901.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11222"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68284-done@debbugs.gnu.org To: kobarity Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 13 10:36:22 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 1rOaRC-0002hE-St for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 13 Jan 2024 10:36:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOaQw-0000yB-IE; Sat, 13 Jan 2024 04:36:06 -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 1rOaQu-0000xo-Uf for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 04:36:05 -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 1rOaQu-000786-2F for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 04:36:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOaQs-00087K-GE for bug-gnu-emacs@gnu.org; Sat, 13 Jan 2024 04:36:02 -0500 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 13 Jan 2024 09:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 68284 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 68284@debbugs.gnu.org, eliz@gnu.org, kobarity@gmail.com Original-Received: via spool by 68284-done@debbugs.gnu.org id=D68284.170513850931096 (code D ref 68284); Sat, 13 Jan 2024 09:36:02 +0000 Original-Received: (at 68284-done) by debbugs.gnu.org; 13 Jan 2024 09:35:09 +0000 Original-Received: from localhost ([127.0.0.1]:38413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOaQ1-00085U-8m for submit@debbugs.gnu.org; Sat, 13 Jan 2024 04:35:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOaPz-00085E-9v for 68284-done@debbugs.gnu.org; Sat, 13 Jan 2024 04:35:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rOaPs-0006ZB-AR; Sat, 13 Jan 2024 04:35:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tM6S2cu4hFSgPDYaYbbaR6OFRCiZohhNUs3Ky0nYIL8=; b=LaBkSklAPDpX llI4xQVUlUCGdqqeXBOmP218LxcDeEKXfLICeFadySCSeSgjvWuPacJjTpsYLBX/t6vym3sgyWQuQ jFmN6qAotvrv0gokXnQgM127Ykmg9ffay5Hi84HKkXXFuJvHnvKFObgGztUoHL168Z3XP5G9blpPO AtoDGv1ByGe7E9ThGMCb+9GW2m3bS/VQM6wr5SiwGWvExUh7BZY26FCF1ixzU+Ql9GvoxZlFmMMIZ +XRQUE9TKPAxP4a4hIVYqHFbfHZETFa4+S/gnK2j0ITuR19vWxWf5b4H9W7WKLXMX5fqzcuGC09UW 4pFtOlgoxGBz5e+YhCZ01A==; In-Reply-To: (message from kobarity on Sat, 06 Jan 2024 22:12:36 +0900) 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:278110 Archived-At: > Date: Sat, 06 Jan 2024 22:12:36 +0900 > From: kobarity > > No matter what the first line of the buffer is, if the second line is > a string literal, `python-info-docstring-p` will misjudge it as a > docstring. This issue can be reproduced as follows: > > 1. emacs -Q > 2. Open a Python file whose contents are as follows: > > #+begin_src python > import sys > """Not a docstring.""" > #+end_src > > 3. Locate the point at the string literal on the second line. > 4. M-: (python-info-docstring-p) > > Although this string literal is not a docstring, it returns t. > Therefore, in `python-mode` (not `python-ts-mode`), this string > literal is rendered in `font-lock-doc-face`. > > This is the reason I changed some ERTs to "expected fail" in the > commit b7b82ecb2b4c2ce33c11e5388b692cd403ab55e6 of Bug#63622. > > Attached is a patch to fix this bug and the above mentioned ERTs and > to restore ERTs I deleted by mistake in commit > 6b2c8dc9050c5c0514fa404733ce1d4a37d00e39 of Bug#63844 (related to > Bug#63622). Thanks, installed on the master branch, and closing the bug.