GNU bug report logs - #9865
24.0.90; recent change in comint.el broke the comint-use-prompt-regexp functionality

Previous Next

Package: emacs;

Reported by: nicholas.dokos <at> hp.com

Date: Tue, 25 Oct 2011 00:11:01 UTC

Severity: normal

Found in version 24.0.90

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 9865-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: nicholas.dokos <at> hp.com
Cc: 9865-done <at> debbugs.gnu.org
Subject: Re: 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
> 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)))))





This bug report was last modified 13 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.