From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Huwig Newsgroups: gmane.emacs.devel Subject: Re: python-mode: make sure output is not eaten Date: Thu, 24 Aug 2006 20:18:07 -0400 Message-ID: References: <20060821220052.494C.SLAWOMIR.NOWACZYK.847@student.lu.se> <87lkphe20n.fsf-monnier+emacs@gnu.org> <20060822201045.4975.SLAWOMIR.NOWACZYK.847@student.lu.se> <87sljo40ra.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1156465124 28610 80.91.229.2 (25 Aug 2006 00:18:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Aug 2006 00:18:44 +0000 (UTC) Cc: Slawomir Nowaczyk , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 25 02:18:42 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GGPP1-0000hY-PJ for ged-emacs-devel@m.gmane.org; Fri, 25 Aug 2006 02:18:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGPP1-0006N2-6Q for ged-emacs-devel@m.gmane.org; Thu, 24 Aug 2006 20:18:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GGPOp-0006M5-F0 for emacs-devel@gnu.org; Thu, 24 Aug 2006 20:18:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GGPOo-0006Jk-0A for emacs-devel@gnu.org; Thu, 24 Aug 2006 20:18:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GGPOn-0006JY-NE for emacs-devel@gnu.org; Thu, 24 Aug 2006 20:18:13 -0400 Original-Received: from [64.233.162.197] (helo=nz-out-0102.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GGPWy-0005i6-1a for emacs-devel@gnu.org; Thu, 24 Aug 2006 20:26:40 -0400 Original-Received: by nz-out-0102.google.com with SMTP id 8so522548nzo for ; Thu, 24 Aug 2006 17:18:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:subject:date:to:x-mailer:from; b=cbS+20sg4Vqkqm2iQgls4u2XjDcws1/CdJ6II+TGJHA+LJv49bOZnNztNt3XPrxXdlvcj5eR4hV4iCnRFito8ku6ixjvIruy9KzW2lrcSRX+qHGqD8l84bW7TNT4kvUn8wzWAAhvq6u3TF1dYx3fVhYSqKl8nX2koPABKLthgeE= Original-Received: by 10.65.116.7 with SMTP id t7mr2946957qbm; Thu, 24 Aug 2006 17:18:12 -0700 (PDT) Original-Received: from ?10.0.1.3? ( [24.95.36.8]) by mx.gmail.com with ESMTP id q13sm1968978qbq.2006.08.24.17.18.11; Thu, 24 Aug 2006 17:18:12 -0700 (PDT) In-Reply-To: <87sljo40ra.fsf-monnier+emacs@gnu.org> Original-To: Stefan Monnier X-Mailer: Apple Mail (2.752.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:58840 Archived-At: On Aug 23, 2006, at 12:04 AM, Stefan Monnier wrote: > > Yes, of course. BTW do you have any idea why the current code uses > "\n\n"? Might it be because the Python interactive interpreter needs the extra newline due to significant whitespace? E.g. >>> for i in range(1,5): ... print i, ... 1 2 3 4 a DEDENT token is created by the unindented second newline, closing the block. A single newline cannot do that as it is also the statement terminator. Probably it compensates for indented text without a trailing newline. It doesn't look like python-mode itself has any situations where this matters, but it is possible -- but unlikely -- for user input to be affected. If you do the following in python-mode with both versions: C-c C-s for i in range(1, 5): C-q C-j print i, you will see the difference in behavior. -- Steven Huwig