From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: paragraph-start in Shell mode and Ielm. Date: Wed, 20 Apr 2005 20:29:26 -0500 (CDT) Message-ID: <200504210129.j3L1TQ526330@raven.dms.auburn.edu> References: <200504200139.j3K1dbk12900@raven.dms.auburn.edu> <87d5squngx.fsf-monnier+emacs@gnu.org> <200504200405.j3K458J13554@raven.dms.auburn.edu> <87y8bet6xi.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1114047125 3317 80.91.229.2 (21 Apr 2005 01:32:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Apr 2005 01:32:05 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 21 03:32:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DOQXu-0001Qj-7p for ged-emacs-devel@m.gmane.org; Thu, 21 Apr 2005 03:31:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOQcW-0003E0-KO for ged-emacs-devel@m.gmane.org; Wed, 20 Apr 2005 21:36:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DOQbM-0002hN-FP for emacs-devel@gnu.org; Wed, 20 Apr 2005 21:35:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DOQbL-0002h0-QZ for emacs-devel@gnu.org; Wed, 20 Apr 2005 21:35:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DOQbL-00025V-Lv for emacs-devel@gnu.org; Wed, 20 Apr 2005 21:35:31 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DOQZw-0003Mh-LU; Wed, 20 Apr 2005 21:34:04 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j3L1VO9N009072; Wed, 20 Apr 2005 20:31:24 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j3L1TQ526330; Wed, 20 Apr 2005 20:29:26 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Wed, 20 Apr 2005 17:42:35 -0400) 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:36218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36218 Richard Stallman wrote: Have you checked all the uses of paragraph-start to make sure they really work when paragraph-start does not match separator lines? Actually, another problem is that some modes apparently _relied_ on the fact that paragraph-separate used to be meaningless if it did not also match paragraph-start. The recent 22.0.50 changes in paragraph behavior have broken paragraphs at least in Shell mode and Ielm. Although I do not know any further examples, it is likely that paragraphs in other modes are now broken too for the same reason. In my proposed changes to misc.texi, I documented the fact that blank lines in Shell mode also separated paragraphs. But I now realize that this was documenting a bug. To be useful in shell mode, paragraphs should cover prompt, input and output. That was the behavior in 21.3 and earlier and we should revert to that correct behavior. If we do not want to revert the changes Stefan referred to then we should set paragraph-separate to something that does not match anything (what is the standard regexp for that? "\\'"?), in Shell mode and Ielm and possibly in some other modes. Below is the proposed new last paragraph of the new "Shell Prompts" node. It assumes that the above bug will be fixed. The description of the behavior of paragraph commands if comint-use-prompt-regexp is nil (the default) is deliberately vague, as it is messy (for people not familiar with fields, it could easily appear to be buggy, especially in as far as numeric arguments and such are concerned). But that behavior is already present in 21.3, so people could actually be used to it. In Shell mode, only shell prompts start new paragraphs. Thus, a paragraph consists of a prompt and the input and output that follow it. However, if @code{comint-use-prompt-regexp} is @code{nil}, the default, most paragraph commands do not cross field boundaries. Thus, with this setting, prompt, input and output behave mostly as if they were separate paragraphs and most numeric arguments to paragraph commands are ignored. For the purpose of finding paragraph boundaries, Shell mode uses @code{shell-prompt-pattern}, regardless of @code{comint-use-prompt-regexp}.