From unknown Sun Jun 22 11:49:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18462: Emacs freeze with python mode and M-q Resent-From: Gaetan Kenway Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Sep 2014 16:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18462@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141054016320604 (code B ref -1); Fri, 12 Sep 2014 16:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Sep 2014 16:42:43 +0000 Received: from localhost ([127.0.0.1]:39604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSTvm-0005MF-Ik for submit@debbugs.gnu.org; Fri, 12 Sep 2014 12:42:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58489) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSR2m-0000m7-Br for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSR2h-0000tE-FD for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2h-0000t8-CP for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2f-0006wv-U7 for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSR2c-0000s8-PT for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:37 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:35891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2c-0000rw-MJ for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:34 -0400 Received: by mail-qg0-f49.google.com with SMTP id j5so703500qga.36 for ; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0BJPETKk2Ve2OP75NLm1Djm2aRP0BQN4E4WuRowCCn0=; b=fRT9kh3sHxn3CZdL9Vda3d79L17hzF0glEyN9DfZGUkzasFAZewnxKDHqff3lPvR46 1CcjwYUY8gYOa15iYlNUnLlk58CWUQ6vF1VoEZjUIrO6m4erYGHTgux+pyUP03Pq/ZsJ Z4qrn4+JCxzAW5T4sb0Wc1TcpfNJnfNZhrHHm5x/6ONXO+mibNEu7wqGmnqF3q29awBe nHZ4orplKD0rFOav82V11DWnx7A5yVWzTY+1oVM7nE+yib8pipxpD19NP/7/pwgczHs7 l0GT2Mwi1B7qIb0Wu+HFwDLzeaVXfKyi6xxtoUYsq5TpN+uLNRFnQlrToXxhEFnTxnup 1GXQ== MIME-Version: 1.0 X-Received: by 10.224.30.14 with SMTP id s14mr12228595qac.70.1410529051832; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) Received: by 10.224.105.148 with HTTP; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) Date: Fri, 12 Sep 2014 09:37:31 -0400 Message-ID: From: Gaetan Kenway Content-Type: multipart/alternative; boundary=047d7beb9cf4147d200502de63a0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Fri, 12 Sep 2014 12:42:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --047d7beb9cf4147d200502de63a0 Content-Type: text/plain; charset=UTF-8 I ran across a odd bug the other day. Essentially, when M-q is run with an open bracket in python mode, emacs will freeze. To replicate the error: $ emacs test.py type: def test( then hit M-q The version of emacs I'm using is: GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian Its not a huge deal, it just struck me as odd since it generally really difficult to get emacs to crash. Thanks, Gaetan --047d7beb9cf4147d200502de63a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I ran across a odd bug the other day. Essentially, wh= en M-q is run with an open bracket in python mode, emacs will freeze.=C2=A0=
To replicate the error:

$ emacs tes= t.py

type:
def test(

then hit M-q

The version of emacs I'm us= ing is:=C2=A0

GNU Emacs 24.3.1 (x86_64-pc-linux-gn= u, GTK+ Version 3.10.7)
=C2=A0of 2014-03-07 on lamiak, modified b= y Debian

Its not a huge deal, it just struck me as= odd since it generally really difficult to get emacs to crash.=C2=A0
=

Thanks,

Gaetan
--047d7beb9cf4147d200502de63a0-- From unknown Sun Jun 22 11:49:50 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18462: Emacs freeze with python mode and M-q References: In-Reply-To: Resent-From: Leonardo Nobrega Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Sep 2014 20:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18462 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18462@debbugs.gnu.org Received: via spool by 18462-submit@debbugs.gnu.org id=B18462.141210982326326 (code B ref 18462); Tue, 30 Sep 2014 20:44:02 +0000 Received: (at 18462) by debbugs.gnu.org; 30 Sep 2014 20:43:43 +0000 Received: from localhost ([127.0.0.1]:56707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ4Gs-0006qX-1n for submit@debbugs.gnu.org; Tue, 30 Sep 2014 16:43:42 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:45790) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ49P-0006bg-MT for 18462@debbugs.gnu.org; Tue, 30 Sep 2014 16:36:00 -0400 Received: by mail-la0-f46.google.com with SMTP id gi9so10541795lab.19 for <18462@debbugs.gnu.org>; Tue, 30 Sep 2014 13:35:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=OnfPKdQY82XWlWkNPiLvfKMyb13SG3HlmFfzacG90XA=; b=sURv2KTq11lYGtgBN+CtcAmpYB8IKTqKzUwQRr3cQZ3hcqWSHESoWIv7KnsSvOMsMu rr7DMw5EHMD9D7UZ+w6EPU+v1sPDEwB+dECiVeVbrjpVxtlsTTCOXTih/6KFCY8aIhg7 46AULXD+maccqiXgNbFZTA65r7O2O31OCsaDoVDBVf6N/piF/Dbbi3+fXXr4U+4tymsj eyOA8wfWWh34Cph5DN3StnKQ75jmxK/7Fcc1S1gPLiIfJuxGY5A5crsePvQaGMPjuCQQ UPaKR1v7oKWEi82yVeY55RuQhTy3EXeLPiCgJRb9h6OafZyCfyz6D/Ot/1bEeT31Wx3V ml4g== MIME-Version: 1.0 X-Received: by 10.152.87.170 with SMTP id az10mr49947074lab.20.1412109358418; Tue, 30 Sep 2014 13:35:58 -0700 (PDT) Received: by 10.114.64.234 with HTTP; Tue, 30 Sep 2014 13:35:58 -0700 (PDT) Date: Tue, 30 Sep 2014 16:35:58 -0400 Message-ID: From: Leonardo Nobrega Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Tue, 30 Sep 2014 16:43:40 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) The second loop in python-fill-paren moves the point until the syntax context changes. If it doesn't find a close-paren before the end of the buffer, it loops forever. ChangeLog entry: * lisp/progmodes/python.el (python-fill-paren): Break end-of-region loop when it reaches point-max. Patch: === modified file 'lisp/progmodes/python.el' *** lisp/progmodes/python.el 2014-09-29 18:14:08 +0000 --- lisp/progmodes/python.el 2014-09-30 20:14:37 +0000 *************** JUSTIFY should be used (if applicable) a *** 3300,3306 **** (end-of-line) (when (not (python-syntax-context 'paren)) (skip-syntax-backward "^)"))) ! (while (python-syntax-context 'paren) (goto-char (1+ (point-marker)))) (point-marker))) (let ((paragraph-start "\f\\|[ \t]*$") --- 3300,3307 ---- (end-of-line) (when (not (python-syntax-context 'paren)) (skip-syntax-backward "^)"))) ! (while (and (python-syntax-context 'paren) ! (< (point) (point-max))) (goto-char (1+ (point-marker)))) (point-marker))) (let ((paragraph-start "\f\\|[ \t]*$") From unknown Sun Jun 22 11:49:50 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Gaetan Kenway Subject: bug#18462: closed (Re: bug#18462: Emacs freeze with python mode and M-q) Message-ID: References: X-Gnu-PR-Message: they-closed 18462 X-Gnu-PR-Package: emacs Reply-To: 18462@debbugs.gnu.org Date: Tue, 30 Sep 2014 23:02:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1412118125-7012-1" This is a multi-part message in MIME format... ------------=_1412118125-7012-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18462: Emacs freeze with python mode and M-q 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 18462@debbugs.gnu.org. --=20 18462: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18462 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1412118125-7012-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18462-done) by debbugs.gnu.org; 30 Sep 2014 23:01:09 +0000 Received: from localhost ([127.0.0.1]:56725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ6Ps-0001no-Ko for submit@debbugs.gnu.org; Tue, 30 Sep 2014 19:01:08 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:13774) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XZ6Pq-0001ng-Fe for 18462-done@debbugs.gnu.org; Tue, 30 Sep 2014 19:01:07 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IPAS-Result: ArUGAIDvNVNFxKjo/2dsb2JhbABZgwaDSsA9gRcXdIIlAQEBAQIBViMFCwsOJhIUGA0kiAQI0hkXjnoHhDgEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="91337839" Received: from 69-196-168-232.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.232]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Sep 2014 19:01:05 -0400 Received: by pastel.home (Postfix, from userid 20848) id 515667CD1; Tue, 30 Sep 2014 19:01:05 -0400 (EDT) From: Stefan Monnier To: Leonardo Nobrega Subject: Re: bug#18462: Emacs freeze with python mode and M-q Message-ID: References: Date: Tue, 30 Sep 2014 19:01:05 -0400 In-Reply-To: (Leonardo Nobrega's message of "Tue, 30 Sep 2014 16:35:58 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18462-done Cc: 18462-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > The second loop in python-fill-paren moves the point until the syntax > context changes. If it doesn't find a close-paren before the end of > the buffer, it loops forever. Thanks, looks good, installed (using eobp). Stefan ------------=_1412118125-7012-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 12 Sep 2014 16:42:43 +0000 Received: from localhost ([127.0.0.1]:39604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSTvm-0005MF-Ik for submit@debbugs.gnu.org; Fri, 12 Sep 2014 12:42:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58489) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XSR2m-0000m7-Br for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSR2h-0000tE-FD for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2h-0000t8-CP for submit@debbugs.gnu.org; Fri, 12 Sep 2014 09:37:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2f-0006wv-U7 for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSR2c-0000s8-PT for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:37 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:35891) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSR2c-0000rw-MJ for bug-gnu-emacs@gnu.org; Fri, 12 Sep 2014 09:37:34 -0400 Received: by mail-qg0-f49.google.com with SMTP id j5so703500qga.36 for ; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=0BJPETKk2Ve2OP75NLm1Djm2aRP0BQN4E4WuRowCCn0=; b=fRT9kh3sHxn3CZdL9Vda3d79L17hzF0glEyN9DfZGUkzasFAZewnxKDHqff3lPvR46 1CcjwYUY8gYOa15iYlNUnLlk58CWUQ6vF1VoEZjUIrO6m4erYGHTgux+pyUP03Pq/ZsJ Z4qrn4+JCxzAW5T4sb0Wc1TcpfNJnfNZhrHHm5x/6ONXO+mibNEu7wqGmnqF3q29awBe nHZ4orplKD0rFOav82V11DWnx7A5yVWzTY+1oVM7nE+yib8pipxpD19NP/7/pwgczHs7 l0GT2Mwi1B7qIb0Wu+HFwDLzeaVXfKyi6xxtoUYsq5TpN+uLNRFnQlrToXxhEFnTxnup 1GXQ== MIME-Version: 1.0 X-Received: by 10.224.30.14 with SMTP id s14mr12228595qac.70.1410529051832; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) Received: by 10.224.105.148 with HTTP; Fri, 12 Sep 2014 06:37:31 -0700 (PDT) Date: Fri, 12 Sep 2014 09:37:31 -0400 Message-ID: Subject: Emacs freeze with python mode and M-q From: Gaetan Kenway To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7beb9cf4147d200502de63a0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 12 Sep 2014 12:42:39 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) --047d7beb9cf4147d200502de63a0 Content-Type: text/plain; charset=UTF-8 I ran across a odd bug the other day. Essentially, when M-q is run with an open bracket in python mode, emacs will freeze. To replicate the error: $ emacs test.py type: def test( then hit M-q The version of emacs I'm using is: GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7) of 2014-03-07 on lamiak, modified by Debian Its not a huge deal, it just struck me as odd since it generally really difficult to get emacs to crash. Thanks, Gaetan --047d7beb9cf4147d200502de63a0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I ran across a odd bug the other day. Essentially, wh= en M-q is run with an open bracket in python mode, emacs will freeze.=C2=A0=
To replicate the error:

$ emacs tes= t.py

type:
def test(

then hit M-q

The version of emacs I'm us= ing is:=C2=A0

GNU Emacs 24.3.1 (x86_64-pc-linux-gn= u, GTK+ Version 3.10.7)
=C2=A0of 2014-03-07 on lamiak, modified b= y Debian

Its not a huge deal, it just struck me as= odd since it generally really difficult to get emacs to crash.=C2=A0
=

Thanks,

Gaetan
--047d7beb9cf4147d200502de63a0-- ------------=_1412118125-7012-1--