From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#9865: 24.0.90; recent change in comint.el broke the comint-use-prompt-regexp functionality Date: Mon, 24 Oct 2011 22:19:45 -0400 Message-ID: References: <16884.1319501334@alphaville.americas.hpqcorp.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319509240 1748 80.91.229.12 (25 Oct 2011 02:20:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2011 02:20:40 +0000 (UTC) Cc: 9865-done@debbugs.gnu.org To: nicholas.dokos@hp.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 25 04:20:36 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RIWd1-00076T-Or for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Oct 2011 04:20:35 +0200 Original-Received: from localhost ([::1]:45738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIWd1-0008I5-8N for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2011 22:20:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIWcx-0008Hp-2G for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 22:20:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIWcu-0002AW-Uk for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 22:20:30 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIWcu-0002AR-T9 for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 22:20:28 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RIWeQ-0004FP-Os for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 22:22:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Oct 2011 02:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 9865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 9865@debbugs.gnu.org, monnier@iro.umontreal.ca Original-Received: via spool by 9865-done@debbugs.gnu.org id=D9865.131950928916286 (code D ref 9865); Tue, 25 Oct 2011 02:22:01 +0000 Original-Received: (at 9865-done) by debbugs.gnu.org; 25 Oct 2011 02:21:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIWds-0004Ed-Lq for submit@debbugs.gnu.org; Mon, 24 Oct 2011 22:21:29 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIWdq-0004EQ-AP for 9865-done@debbugs.gnu.org; Mon, 24 Oct 2011 22:21:27 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsMHAHwcpk5MCrTo/2dsb2JhbABDmheMdYIIgQaBbgEBBAFWIwULCzQSFBgNiDe0aIhABKE7hEU X-IronPort-AV: E=Sophos;i="4.69,401,1315195200"; d="scan'208";a="144193410" Original-Received: from 76-10-180-232.dsl.teksavvy.com (HELO ceviche.home) ([76.10.180.232]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 24 Oct 2011 22:19:46 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id BCD3366158; Mon, 24 Oct 2011 22:19:45 -0400 (EDT) In-Reply-To: <16884.1319501334@alphaville.americas.hpqcorp.net> (Nick Dokos's message of "Mon, 24 Oct 2011 20:08:54 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 24 Oct 2011 22:22:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53100 Archived-At: > I set comint-use-prompt-regexp to t and comint-prompt-regexp to "^[^#$%>\n]*[#$%>] *" > (the shell: regexp from the documentation of this variable). > In 24.0.90, this is broken: (comint-get-old-input-default) returns much > (if not all) of the previous input and output as well: chaos ensues when > the shell tries to execute every line. Thank you. I installed the patch below which should fix this problem. Please keep your eyes open for any odd behaviors in comint since I may have a missed a few more such cases. Stefan === modified file 'lisp/comint.el' --- lisp/comint.el 2011-10-18 03:57:12 +0000 +++ lisp/comint.el 2011-10-25 02:10:32 +0000 @@ -2153,7 +2166,8 @@ the current line with any initial string matching the regexp `comint-prompt-regexp' removed." (let ((bof (field-beginning))) - (if (null (get-char-property bof 'field)) ;Not `output'. + (if (and comint-use-prompt-regexp + (null (get-char-property bof 'field))) ;Not `output'. (field-string-no-properties bof) (comint-bol) (buffer-substring-no-properties (point) (line-end-position)))))