From unknown Sat Aug 16 21:18:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62325: Python quotes/apostrophes can cause hang Resent-From: Gabriel Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Mar 2023 08:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 62325@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16793873582692 (code B ref -1); Tue, 21 Mar 2023 08:30:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Mar 2023 08:29:18 +0000 Received: from localhost ([127.0.0.1]:57554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peXMr-0000hL-MI for submit@debbugs.gnu.org; Tue, 21 Mar 2023 04:29:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:33724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peP3C-0003Zj-2z for submit@debbugs.gnu.org; Mon, 20 Mar 2023 19:36:26 -0400 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 1peP3B-00056E-Po for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 19:36:25 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peP3A-0007un-4n for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 19:36:25 -0400 Received: by mail-ot1-x329.google.com with SMTP id k14-20020a056830150e00b0069f156d4ce9so3055318otp.6 for ; Mon, 20 Mar 2023 16:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679355382; h=mime-version:message-id:to:subject:from:date:from:to:cc:subject :date:message-id:reply-to; bh=WxNebXqbrwEQUfKh1DHwFgAy9F6afnVOoWFo4hUd3LM=; b=aGTNuSOqGw4bEEDb/j0Y3Iux1BpEAV6ntrsh0Fe+V7Wn6AVmzlzK6BkL0WLwlnZfuN 1arCxuZFSWH1pOBDVmv4d1/FZPjK1jMIzqe/ZEm+wJeLqnMlLeC4t21i7X/jF0OXJQc0 n+v4MKVQlUWoHAah4h9HuKnnQ0e+hci+eDZuBT420dKj1ISuu9SZ6ES79i22OGf3ZlCP aUeWvefmrvm602hfRpbbcKcRJnwM/RzZa4FIPyWznqawDOK83dtj1ql4NW1yH3+fmFO9 2Dw4o/Q61NzjhSSp5HL9XOgUUPxKtEMcr4czk6WMAGriLgdJzWUnaTgeOGLspfED1XVD qF6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679355382; h=mime-version:message-id:to:subject:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WxNebXqbrwEQUfKh1DHwFgAy9F6afnVOoWFo4hUd3LM=; b=qWzcG1tkIRIpJBWEamctk1GQtO88JbMqJYkAcW37S6esq5EUyrTuK68tr41dDWhDMK kkdwW5RyEcfl/PTqkAtiu9YsDgbBJS/s6aBcsanWK70ckJS1+7jgOVNAamFlaT8tLaxy wVJXZbWAKDhXHB9JYu8kdV+ENwm4oYKdLRzodeadnAj99pXJVBsq0ssYDh0ud8Lw3URO 29fOKSUh6/GxI0kr4f6mk7sia8QM7L/C9FlRhJfczsix/0U3i7ESjOzfxSur63+NFzXt hUY08k0TWGwl9VJQ1bkTFZ1O6Xlns20lwIZ41aja+c2AGvOMlIue7FBmcnWxtMPB5PKE TzAg== X-Gm-Message-State: AO0yUKViSMBWDHhTXno9hKFE78KsjFA5+E+SLCAVZb8lp32pMynk2wmS cCzKtCARfbNamz8wvSkPrEbW1SbhsA== X-Google-Smtp-Source: AK7set+IcMazef85z8Wc9BWmqHxi5rhj4Uh/7uMjWT8Yt/R/09FM3FiIfPqzncbhUUdcQ60qFGlkJQ== X-Received: by 2002:a9d:7382:0:b0:69f:4bb:199f with SMTP id j2-20020a9d7382000000b0069f04bb199fmr220976otk.23.1679355382209; Mon, 20 Mar 2023 16:36:22 -0700 (PDT) Received: from [10.146.168.166] (nat-128-62-42-139.public.utexas.edu. [128.62.42.139]) by smtp.gmail.com with ESMTPSA id e81-20020a4a5554000000b0053b543b027bsm295186oob.42.2023.03.20.16.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 16:36:21 -0700 (PDT) Date: Mon, 20 Mar 2023 18:36:16 -0500 From: Gabriel Brown Message-Id: X-Mailer: geary/43.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-q1G2MuwWMsJaVhPnG/l3" Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=gabriel.h.brown@gmail.com; helo=mail-ot1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Mailman-Approved-At: Tue, 21 Mar 2023 04:29:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-q1G2MuwWMsJaVhPnG/l3 Content-Type: multipart/alternative; boundary="=-Kj3AjObaauAcpmiBUSHf" --=-Kj3AjObaauAcpmiBUSHf Content-Type: text/plain; charset=us-ascii; format=flowed Hi, all. First bug report for me. I've searched to see if there are other reports of my issue, but turned up empty handed. --- Summary --- It seems when there are three or more python docstrings (each bordered by two lines of triple quotes """) and each containing an apostrophe, then the next time a quote docstring is to be inserted Emacs hangs. I have included a minimum viable example file that reproduces this behavior on my machine. Simply replace the angle bracket line containing the instructions with triple quotes, and Emacs should hang. (In case file attachments don't work I have included the text of the file at the end of the email.) --- Additional information --- Emacs version: 28.2 (via pacman package manager) machine: EndeavourOS Linux x86_64 (kernel: 6.2.2-arch1-1) reply email: gabriel.h.brown@gmail.com --- start of example file --- def f_0(): # inline comment < try replacing with triple quotes > return 4 def f_1(): """ ghbrown's first comment """ return 1 def f_2(): """ ghbrown's second comment """ return 1 def f_3(): """ ghbrown's third comment """ return 1 --- end of example file --- --=-Kj3AjObaauAcpmiBUSHf Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable
Hi, all. First bug report for me. = I've searched to see if there are other reports of my issue, but turned up = empty handed.

--- Summary ---
It seems w= hen there are three or more python docstrings (each bordered by two lines o= f triple quotes """) and each containing an apostrophe, then the next time = a quote docstring is to be inserted Emacs hangs.

I= have included a minimum viable example file that reproduces this behavior = on my machine. Simply replace the angle bracket line containing the instruc= tions with triple quotes, and Emacs should hang. (In case file attachments = don't work I have included the text of the file at the end of the email.)

--- Additional information ---
Emacs vers= ion: 28.2 (via pacman package manager)
machine: EndeavourOS Linux= x86_64 (kernel: 6.2.2-arch1-1)
reply email: gabriel.h.brown@gmai= l.com

--- start of example file ---
def f_0():
    # inline comment
   = ; < try replacing with triple quotes >
    return= 4

def f_1():
    """
    ghbrown's first comment
    """
    return 1

def f_2():
&nb= sp;   """
    ghbrown's second comment
&= nbsp;   """
    return 1

= def f_3():
    """
    ghbrown's th= ird comment
    """
    return 1
--- end of example file ---

--=-Kj3AjObaauAcpmiBUSHf-- --=-q1G2MuwWMsJaVhPnG/l3 Content-Type: text/x-python Content-Disposition: attachment; filename=mve.py Content-Transfer-Encoding: base64 CmRlZiBmXzAoKToKICAgICMgaW5saW5lIGNvbW1lbnQKICAgIDwgdHJ5IHJlcGxhY2luZyB3aXRo IHRyaXBsZSBxdW90ZXMgPgogICAgcmV0dXJuIDQKCmRlZiBmXzEoKToKICAgICIiIgogICAgZ2hi cm93bidzIGZpcnN0IGNvbW1lbnQKICAgICIiIgogICAgcmV0dXJuIDEKCmRlZiBmXzIoKToKICAg ICIiIgogICAgZ2hicm93bidzIHNlY29uZCBjb21tZW50CiAgICAiIiIKICAgIHJldHVybiAxCgpk ZWYgZl8zKCk6CiAgICAiIiIKICAgIGdoYnJvd24ncyB0aGlyZCBjb21tZW50CiAgICAiIiIKICAg IHJldHVybiAxCg== --=-q1G2MuwWMsJaVhPnG/l3-- From unknown Sat Aug 16 21:18:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62325: Python quotes/apostrophes can cause hang Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Mar 2023 10:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gabriel Brown Cc: 62325@debbugs.gnu.org Received: via spool by 62325-submit@debbugs.gnu.org id=B62325.167939315219792 (code B ref 62325); Tue, 21 Mar 2023 10:06:01 +0000 Received: (at 62325) by debbugs.gnu.org; 21 Mar 2023 10:05:52 +0000 Received: from localhost ([127.0.0.1]:57707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peYsK-000599-62 for submit@debbugs.gnu.org; Tue, 21 Mar 2023 06:05:52 -0400 Received: from heytings.org ([95.142.160.155]:48208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peYsH-00058z-MU for 62325@debbugs.gnu.org; Tue, 21 Mar 2023 06:05:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1679393148; bh=9N/y1RpUnY9LF5goex9uCZL1/pTCWlO91dvKB6XqQHA=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=RAYuPyTetIXeAhGHtlLASUq+x+jsIeYG+WhKu1FxiWtrrzmbvarBKWcYxYcgeNnU+ qHUCas42os10cA/rVaZhHhwgbnDWK19qb8YCO7vMgkTeJgogUpZZTIzGSBVI/SYZWr b69KxpOSz7sZAkzOjF1B1xhJY5gAxAW0HcRNerSHLi/ohMJeW63qrd5os1o5PyITeb yN2tYo3HpxX0H8hOZAlAJiRgFt98fXNT4NUiVa1AkIEhcUnuVHRlKhZz1nH/7yhCmB TInEiAvmFRlFHUzgAhgfzIWN/KGaTGI1GwLMNxUwBy/Mgqa96KDj9S3tXM2yKv1GfR T2I/ve1OQBYgg== Date: Tue, 21 Mar 2023 10:05:47 +0000 From: Gregory Heytings In-Reply-To: Message-ID: <08b5f766ddf64c5efafd@heytings.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > > It seems when there are three or more python docstrings (each bordered > by two lines of triple quotes """) and each containing an apostrophe, > then the next time a quote docstring is to be inserted Emacs hangs. > Thanks for your bug report. I can reproduce that bug with Emacs 27 and 28, but not with Emacs 29. From unknown Sat Aug 16 21:18:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62325: Python quotes/apostrophes can cause hang Resent-From: kobarity Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Mar 2023 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Gabriel Brown Cc: 62325@debbugs.gnu.org Received: via spool by 62325-submit@debbugs.gnu.org id=B62325.16793991386489 (code B ref 62325); Tue, 21 Mar 2023 11:46:01 +0000 Received: (at 62325) by debbugs.gnu.org; 21 Mar 2023 11:45:38 +0000 Received: from localhost ([127.0.0.1]:57792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peaQs-0001gb-9k for submit@debbugs.gnu.org; Tue, 21 Mar 2023 07:45:38 -0400 Received: from mail-pj1-f52.google.com ([209.85.216.52]:46618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peaQq-0001gO-Qx for 62325@debbugs.gnu.org; Tue, 21 Mar 2023 07:45:37 -0400 Received: by mail-pj1-f52.google.com with SMTP id f6-20020a17090ac28600b0023b9bf9eb63so15608760pjt.5 for <62325@debbugs.gnu.org>; Tue, 21 Mar 2023 04:45:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679399130; 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=WoT4gvsggveamEQH9GGiuye66kpr3T12sV8TadLfSeg=; b=hVIOmHvAZ1dIm+M2UF5aAvPE0KcHhzkXTSaTjOEPlIQHi4rPk8HvnGibix4CgyMVci r8B6YWW4O0GzMBulJXyn1iua256W4euHd9Pb2Y3p9fG8hIIoDVJn5lLEbl9+nLAlV2OX V/MxLqo8V296kA8K9mXupYgm33z/4kk+ezsdd3JV0UKGww56yvd+eWlfC/3vR6xGMQn7 W8UcbAdjtlaONL+0t7im5vNBr5xFIz3xqsFRtITe7VoAVr1m17sz+hcT48/6jZ4Vwoqv WN4qS2aL7/hTPVsapKA1BsXv2faN0kC/iPHvflkuqdeAEbFsgfL+edqlHkFeytJPrXGX jXqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679399130; 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=WoT4gvsggveamEQH9GGiuye66kpr3T12sV8TadLfSeg=; b=w/RCwyAxxtWJiLorlejQdMZb3rdoApa/lt5mY6iJVZV7BIXfc2DsVSlwi4bNNK/1qg /g0U0vk4bVe/aqKvNC19V4YeIsX8z4K5xSBCIUhfJ6IUAB4DtIsQaWjsjcWnYUr32f4Y MrVh7/SBkcT3r6QBVcfbr6lW+2X3TfC2ODHK3ptLXmA1DBrRU2KcCoWrYhxb4M8w25jj J4yredODYE8E/m2Y6uNk4NyJqL1OaOPRmdzZI3tZuhajBp03nfmkEYuovNuIzevNb+0J +BiBKIdCXvSIjwqlJKVZ5a+QKlVi1kJpqFEPmIrr3ISTErapD/at1DRqTs237SSKcaC1 0wHw== X-Gm-Message-State: AO0yUKVHThsx5EO5eJZFzgQ31nkF0Du51j21wfWOvkYdNVfYcV3JwgkK FPOZu+tdkCKsnDop5Bw9i0o= X-Google-Smtp-Source: AK7set9bIPVzEuYbSrc0SlmgqIBaJLUrR/ZQBq4AdzyzsFL79pNQlTdrV/wz9bO264g5pigjNJGJJQ== X-Received: by 2002:a17:903:2288:b0:19e:bc01:610e with SMTP id b8-20020a170903228800b0019ebc01610emr2405034plh.33.1679399130631; Tue, 21 Mar 2023 04:45:30 -0700 (PDT) Received: from localhost (58x12x133x161.ap58.ftth.ucom.ne.jp. [58.12.133.161]) by smtp.gmail.com with ESMTPSA id s12-20020a170902a50c00b0019c2d664869sm8496401plq.298.2023.03.21.04.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 04:45:30 -0700 (PDT) Date: Tue, 21 Mar 2023 20:45:28 +0900 Message-ID: From: kobarity In-Reply-To: References: 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) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gabriel Brown wrote: > It seems when there are three or more python docstrings (each bordered by= two lines of triple quotes """) and each > containing an apostrophe, then the next time a quote docstring is to be i= nserted Emacs hangs. Hi Gabriel, =46rom my testing of your example, the problem appears to be fixed with the #58780 fix. Can you test with the latest Emacs in emacs-29 branch or master branch? Or you can try the patch attached in #58780. From unknown Sat Aug 16 21:18:13 2025 X-Loop: help-debbugs@gnu.org Subject: bug#62325: Python quotes/apostrophes can cause hang Resent-From: Gabriel Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 05 Apr 2023 07:32:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62325 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: kobarity Cc: 62325@debbugs.gnu.org Received: via spool by 62325-submit@debbugs.gnu.org id=B62325.168067987215308 (code B ref 62325); Wed, 05 Apr 2023 07:32:03 +0000 Received: (at 62325) by debbugs.gnu.org; 5 Apr 2023 07:31:12 +0000 Received: from localhost ([127.0.0.1]:50770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjxbr-0003yl-Ot for submit@debbugs.gnu.org; Wed, 05 Apr 2023 03:31:12 -0400 Received: from mail-oi1-f181.google.com ([209.85.167.181]:34636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjq06-0004CL-9I for 62325@debbugs.gnu.org; Tue, 04 Apr 2023 19:23:43 -0400 Received: by mail-oi1-f181.google.com with SMTP id w133so25474675oib.1 for <62325@debbugs.gnu.org>; Tue, 04 Apr 2023 16:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680650616; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:from:to:cc:subject:date:message-id:reply-to; bh=bj9bSp7LsMxDKqS7eMVIVoebxFrcFECvDrTSD1j862U=; b=EvYU2PyZ7FQrmZrxHssgovCNiGMf3iFdWvkF2h4sMbN3J4/x4ZVku0vAEmW3NloO79 W4nsAVuegQbNn/JydtvbPLeB4NEkxXfWTluGDp4O76Y7eCHZnaRnsk04FxTL3833xjat RNofKUB7Y1oqqLk7kopE00l4AnlykBWUKW4LH6A7hs0QlfCTeC6hEoIFG2DgRK2Tqidj xdyNJzrlNyHDQbGx2XmUOLunKr8lw3GqYJRrKB9dJueEVFFzZ0Yv7NT4eCLj6tyN5r7m D6aQ8W0ruBNEonG1H4/it97YZHXtUP5rEIWeVz40nbsMY2N0ZCLeTuQMgV9L2HnvkJP0 uIWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680650616; h=mime-version:references:in-reply-to:message-id:cc:to:subject:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bj9bSp7LsMxDKqS7eMVIVoebxFrcFECvDrTSD1j862U=; b=eGTMQD+/YvXFJBlS1b+Ej4o5dqa+naqAGF4Ppaa4KEKQIn6pMaFwTrADhKjuVYYGQt 01TZWkgDFMGgkNpObPgl0Ak5+8ZVYssPiVlLjd5DiMeorbu1FgksBbLSKtK/hC4BEcqy fA9NtSJTGUpl/njfPd5JY5tFS4JyXtERytEWgWxlUWPABMsKgG/tWw2aNX1c1jWp4ZTQ WLB6ZXTCbwjvNnUk37WdULjXBAQ6il2RFNEzFymKLiTWYmpu15PaVnIJh9KHLdWctlv9 t3T32lpThkx0qKsOPrMo9VjowsQs0VaIn3iwmldNJOXCcwGO61BDs0S4CgrCVSwDi9EZ fYcQ== X-Gm-Message-State: AAQBX9dlDRfh+6YGAE8WJ2Y8CA0crn2m6J2wWK5q6mTt2yFFvARc0hjp 1LUVWttaddW7ck39tHWE+g== X-Google-Smtp-Source: AKy350aDTrffVGeyQ0T0OGlBuleLVSAJEgO897BiSt0roJY+udD63qxlJDR/ERKe3Y/wJblizoDbeQ== X-Received: by 2002:a05:6808:8ef:b0:389:263d:e6be with SMTP id d15-20020a05680808ef00b00389263de6bemr1942974oic.42.1680650616404; Tue, 04 Apr 2023 16:23:36 -0700 (PDT) Received: from [10.145.38.123] (nat-128-62-18-104.public.utexas.edu. [128.62.18.104]) by smtp.gmail.com with ESMTPSA id m24-20020a05680806d800b0037b6f5d6309sm5710176oih.2.2023.04.04.16.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Apr 2023 16:23:35 -0700 (PDT) Date: Tue, 04 Apr 2023 18:23:29 -0500 From: Gabriel Brown Message-Id: <5B6MSR.BTBJHTFF416J1@gmail.com> In-Reply-To: References: X-Mailer: geary/43.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-KZVAQagRZpQAivy8Yibu" X-Spam-Score: 0.0 (/) X-Mailman-Approved-At: Wed, 05 Apr 2023 03:31:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-KZVAQagRZpQAivy8Yibu Content-Type: text/plain; charset=us-ascii; format=flowed Apologies for the delay. I finally came into some time to switch Emacs versions, and using the makepkg branch for Emacs 29 I no longer see the issue I reported. Thanks again! On Tue, Mar 21 2023 at 08:45:28 PM +09:00:00, kobarity wrote: > > Gabriel Brown wrote: >> It seems when there are three or more python docstrings (each >> bordered by two lines of triple quotes """) and each >> containing an apostrophe, then the next time a quote docstring is >> to be inserted Emacs hangs. > > Hi Gabriel, > > From my testing of your example, the problem appears to be fixed with > the #58780 fix. Can you test with the latest Emacs in emacs-29 branch > or master branch? Or you can try the patch attached in #58780. --=-KZVAQagRZpQAivy8Yibu Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable
Apologies for the delay. I finally came= into some time to switch Emacs versions, and using the makepkg branch for = Emacs 29 I no longer see the issue I reported.

Thanks again!


On = Tue, Mar 21 2023 at 08:45:28 PM +09:00:00, kobarity <kobarity@gmail.com&= gt; wrote:
Gabriel Brown wrote:
It seems when there are three or more python docstrings (each = bordered by two lines of triple quotes """) and each containing an apostrophe, then the next time a quote docstring is to be in= serted Emacs hangs.
Hi Gabriel, >From my testing of your example, the problem appears to be fixed with the #58780 fix. Can you test with the latest Emacs in emacs-29 branch or master branch? Or you can try the patch attached in #58780.
--=-KZVAQagRZpQAivy8Yibu-- From unknown Sat Aug 16 21:18:13 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gabriel Brown Subject: bug#62325: closed (Re: bug#62325: Python quotes/apostrophes can cause hang) Message-ID: References: <83wn2qsp2o.fsf@gnu.org> X-Gnu-PR-Message: they-closed 62325 X-Gnu-PR-Package: emacs Reply-To: 62325@debbugs.gnu.org Date: Wed, 05 Apr 2023 08:37:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1680683822-23250-1" This is a multi-part message in MIME format... ------------=_1680683822-23250-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #62325: Python quotes/apostrophes can cause hang which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 62325@debbugs.gnu.org. --=20 62325: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D62325 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1680683822-23250-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 62325-done) by debbugs.gnu.org; 5 Apr 2023 08:36:11 +0000 Received: from localhost ([127.0.0.1]:50839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjycl-00061x-Fk for submit@debbugs.gnu.org; Wed, 05 Apr 2023 04:36:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjyck-00061k-Hx for 62325-done@debbugs.gnu.org; Wed, 05 Apr 2023 04:36:10 -0400 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 1pjyce-0002x3-QZ; Wed, 05 Apr 2023 04:36:05 -0400 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=us53s7LHnIv78YPTkrdpk5ujAGDkVhzzp5Xw9w2XB38=; b=ZUV1cQZMseVW Yo+CHgdbd0+HE23Nw7NA0AOpSf/UTvtlKSrrrG1I0Juw6UmMY8DdmucjkkP6SMcgFR4Yh4ix14jA0 wtbDGw2exn4gJqpQXxGh+67IRxUOXOG8CqoJL6H+NzX3qk5m0AMy6xC6yX7hcS/+ogdE8Ms6BwijP 6un5oXWRGOFQVoPNjSbTpagwuoIo750S952XDYCKJXWCdh7lOMUB9o4zgmxYZgHSW/oXnd/TlMxY+ 31Uk7hIBQFtSEdr9u8lV5EhqaIz6ARKMNKpfXEzn7yVR1zfyLi1ZvdAWQxVv96REYxdhJm4Y2YIOF keDDJ32P5lrnng2tTjnJAw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjyce-0001FQ-1g; Wed, 05 Apr 2023 04:36:04 -0400 Date: Wed, 05 Apr 2023 11:36:31 +0300 Message-Id: <83wn2qsp2o.fsf@gnu.org> From: Eli Zaretskii To: Gabriel Brown In-Reply-To: <5B6MSR.BTBJHTFF416J1@gmail.com> (message from Gabriel Brown on Tue, 04 Apr 2023 18:23:29 -0500) Subject: Re: bug#62325: Python quotes/apostrophes can cause hang References: <5B6MSR.BTBJHTFF416J1@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62325-done Cc: kobarity@gmail.com, 62325-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 62325@debbugs.gnu.org > Date: Tue, 04 Apr 2023 18:23:29 -0500 > From: Gabriel Brown > > Apologies for the delay. I finally came into some time to switch Emacs versions, and using the makepkg > branch for Emacs 29 I no longer see the issue I reported. Thanks, I'm therefore closing this bug. ------------=_1680683822-23250-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Mar 2023 08:29:18 +0000 Received: from localhost ([127.0.0.1]:57554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peXMr-0000hL-MI for submit@debbugs.gnu.org; Tue, 21 Mar 2023 04:29:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:33724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peP3C-0003Zj-2z for submit@debbugs.gnu.org; Mon, 20 Mar 2023 19:36:26 -0400 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 1peP3B-00056E-Po for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 19:36:25 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peP3A-0007un-4n for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 19:36:25 -0400 Received: by mail-ot1-x329.google.com with SMTP id k14-20020a056830150e00b0069f156d4ce9so3055318otp.6 for ; Mon, 20 Mar 2023 16:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679355382; h=mime-version:message-id:to:subject:from:date:from:to:cc:subject :date:message-id:reply-to; bh=WxNebXqbrwEQUfKh1DHwFgAy9F6afnVOoWFo4hUd3LM=; b=aGTNuSOqGw4bEEDb/j0Y3Iux1BpEAV6ntrsh0Fe+V7Wn6AVmzlzK6BkL0WLwlnZfuN 1arCxuZFSWH1pOBDVmv4d1/FZPjK1jMIzqe/ZEm+wJeLqnMlLeC4t21i7X/jF0OXJQc0 n+v4MKVQlUWoHAah4h9HuKnnQ0e+hci+eDZuBT420dKj1ISuu9SZ6ES79i22OGf3ZlCP aUeWvefmrvm602hfRpbbcKcRJnwM/RzZa4FIPyWznqawDOK83dtj1ql4NW1yH3+fmFO9 2Dw4o/Q61NzjhSSp5HL9XOgUUPxKtEMcr4czk6WMAGriLgdJzWUnaTgeOGLspfED1XVD qF6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679355382; h=mime-version:message-id:to:subject:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WxNebXqbrwEQUfKh1DHwFgAy9F6afnVOoWFo4hUd3LM=; b=qWzcG1tkIRIpJBWEamctk1GQtO88JbMqJYkAcW37S6esq5EUyrTuK68tr41dDWhDMK kkdwW5RyEcfl/PTqkAtiu9YsDgbBJS/s6aBcsanWK70ckJS1+7jgOVNAamFlaT8tLaxy wVJXZbWAKDhXHB9JYu8kdV+ENwm4oYKdLRzodeadnAj99pXJVBsq0ssYDh0ud8Lw3URO 29fOKSUh6/GxI0kr4f6mk7sia8QM7L/C9FlRhJfczsix/0U3i7ESjOzfxSur63+NFzXt hUY08k0TWGwl9VJQ1bkTFZ1O6Xlns20lwIZ41aja+c2AGvOMlIue7FBmcnWxtMPB5PKE TzAg== X-Gm-Message-State: AO0yUKViSMBWDHhTXno9hKFE78KsjFA5+E+SLCAVZb8lp32pMynk2wmS cCzKtCARfbNamz8wvSkPrEbW1SbhsA== X-Google-Smtp-Source: AK7set+IcMazef85z8Wc9BWmqHxi5rhj4Uh/7uMjWT8Yt/R/09FM3FiIfPqzncbhUUdcQ60qFGlkJQ== X-Received: by 2002:a9d:7382:0:b0:69f:4bb:199f with SMTP id j2-20020a9d7382000000b0069f04bb199fmr220976otk.23.1679355382209; Mon, 20 Mar 2023 16:36:22 -0700 (PDT) Received: from [10.146.168.166] (nat-128-62-42-139.public.utexas.edu. [128.62.42.139]) by smtp.gmail.com with ESMTPSA id e81-20020a4a5554000000b0053b543b027bsm295186oob.42.2023.03.20.16.36.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Mar 2023 16:36:21 -0700 (PDT) Date: Mon, 20 Mar 2023 18:36:16 -0500 From: Gabriel Brown Subject: Python quotes/apostrophes can cause hang To: bug-gnu-emacs@gnu.org Message-Id: X-Mailer: geary/43.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-q1G2MuwWMsJaVhPnG/l3" Received-SPF: pass client-ip=2607:f8b0:4864:20::329; envelope-from=gabriel.h.brown@gmail.com; helo=mail-ot1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 21 Mar 2023 04:29:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-q1G2MuwWMsJaVhPnG/l3 Content-Type: multipart/alternative; boundary="=-Kj3AjObaauAcpmiBUSHf" --=-Kj3AjObaauAcpmiBUSHf Content-Type: text/plain; charset=us-ascii; format=flowed Hi, all. First bug report for me. I've searched to see if there are other reports of my issue, but turned up empty handed. --- Summary --- It seems when there are three or more python docstrings (each bordered by two lines of triple quotes """) and each containing an apostrophe, then the next time a quote docstring is to be inserted Emacs hangs. I have included a minimum viable example file that reproduces this behavior on my machine. Simply replace the angle bracket line containing the instructions with triple quotes, and Emacs should hang. (In case file attachments don't work I have included the text of the file at the end of the email.) --- Additional information --- Emacs version: 28.2 (via pacman package manager) machine: EndeavourOS Linux x86_64 (kernel: 6.2.2-arch1-1) reply email: gabriel.h.brown@gmail.com --- start of example file --- def f_0(): # inline comment < try replacing with triple quotes > return 4 def f_1(): """ ghbrown's first comment """ return 1 def f_2(): """ ghbrown's second comment """ return 1 def f_3(): """ ghbrown's third comment """ return 1 --- end of example file --- --=-Kj3AjObaauAcpmiBUSHf Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable
Hi, all. First bug report for me. = I've searched to see if there are other reports of my issue, but turned up = empty handed.

--- Summary ---
It seems w= hen there are three or more python docstrings (each bordered by two lines o= f triple quotes """) and each containing an apostrophe, then the next time = a quote docstring is to be inserted Emacs hangs.

I= have included a minimum viable example file that reproduces this behavior = on my machine. Simply replace the angle bracket line containing the instruc= tions with triple quotes, and Emacs should hang. (In case file attachments = don't work I have included the text of the file at the end of the email.)

--- Additional information ---
Emacs vers= ion: 28.2 (via pacman package manager)
machine: EndeavourOS Linux= x86_64 (kernel: 6.2.2-arch1-1)
reply email: gabriel.h.brown@gmai= l.com

--- start of example file ---
def f_0():
    # inline comment
   = ; < try replacing with triple quotes >
    return= 4

def f_1():
    """
    ghbrown's first comment
    """
    return 1

def f_2():
&nb= sp;   """
    ghbrown's second comment
&= nbsp;   """
    return 1

= def f_3():
    """
    ghbrown's th= ird comment
    """
    return 1
--- end of example file ---

--=-Kj3AjObaauAcpmiBUSHf-- --=-q1G2MuwWMsJaVhPnG/l3 Content-Type: text/x-python Content-Disposition: attachment; filename=mve.py Content-Transfer-Encoding: base64 CmRlZiBmXzAoKToKICAgICMgaW5saW5lIGNvbW1lbnQKICAgIDwgdHJ5IHJlcGxhY2luZyB3aXRo IHRyaXBsZSBxdW90ZXMgPgogICAgcmV0dXJuIDQKCmRlZiBmXzEoKToKICAgICIiIgogICAgZ2hi cm93bidzIGZpcnN0IGNvbW1lbnQKICAgICIiIgogICAgcmV0dXJuIDEKCmRlZiBmXzIoKToKICAg ICIiIgogICAgZ2hicm93bidzIHNlY29uZCBjb21tZW50CiAgICAiIiIKICAgIHJldHVybiAxCgpk ZWYgZl8zKCk6CiAgICAiIiIKICAgIGdoYnJvd24ncyB0aGlyZCBjb21tZW50CiAgICAiIiIKICAg IHJldHVybiAxCg== --=-q1G2MuwWMsJaVhPnG/l3-- ------------=_1680683822-23250-1--