unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: nicholas.dokos@hp.com
Cc: 9865-done@debbugs.gnu.org
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	[thread overview]
Message-ID: <jwv8vo9253m.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <16884.1319501334@alphaville.americas.hpqcorp.net> (Nick Dokos's message of "Mon, 24 Oct 2011 20:08:54 -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)))))






      reply	other threads:[~2011-10-25  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-25  0:08 bug#9865: 24.0.90; recent change in comint.el broke the comint-use-prompt-regexp functionality Nick Dokos
2011-10-25  2:19 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv8vo9253m.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=9865-done@debbugs.gnu.org \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).