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 #11 received at 9865-done <at> debbugs.gnu.org (full text, mbox):

From: Nick Dokos <nicholas.dokos <at> hp.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 9865-done <at> debbugs.gnu.org, nicholas.dokos <at> hp.com
Subject: Re: bug#9865: 24.0.90;
	recent change in comint.el broke the comint-use-prompt-regexp
	functionality
Date: Mon, 24 Oct 2011 23:51:44 -0400
Stefan Monnier <monnier <at> iro.umontreal.ca> wrote:

> > 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)))))
> 

That still gives me the same problem - shouldn't it be

> +    (if (and (not comint-use-prompt-regexp)

instead?

Thanks,
Nick




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

Previous Next


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