bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs hangs in ansi-term


From: Harry Kuiper
Subject: Re: emacs hangs in ansi-term
Date: 20 Apr 2002 09:37:07 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden writes:

<snip>
> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:
> 
> The problem that was discussed in the gnu.emacs.help newsgroup happens
> by me always. To produce the bug I do the following:
> 
> $ emacs -q --no-site-file
> M-x ansi-term
> Run program: /bin/bash
> 
> Now type in in the buffer *ansi-term* for example 'ls' and then emacs
> seems to be in a endless loop and consumes a lots of memory. Stopping
> with C-g is not possible. This happens also with the most other
> commands. E.g. 'echo $ABC' (ABC is a non exixting env variable)
> produces strange output. 'echo $HOME' causes the same as ls. Emacs
> hangs!

This problem was solved by Daiki Ueno.  His patch will be part of the
next Emacs release.  FYI here is the patch:

Index: term.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/term.el,v
retrieving revision 1.46
diff -u -F^( -r1.46 term.el
--- term.el     3 Feb 2002 11:25:23 -0000       1.46
+++ term.el     14 Apr 2002 00:56:23 -0000
@@ -2827,11 +2827,11 @@ (defun term-emulate-terminal (proc str)
                           ((eq char ?\^G)
                            (beep t)) ; Bell
                           ((eq char ?\032)
-                           (let ((end (string-match "\r?$" str i)))
+                           (let ((end (string-match "\r?\n" str i)))
                              (if end
-                                 (progn (funcall term-command-hook
-                                                 (substring str (1+ i) end))
-                                        (setq i (match-end 0)))
+                                 (funcall term-command-hook
+                                          (prog1 (substring str (1+ i) end)
+                                             (setq i (match-end 0))))
                                (setq term-terminal-parameter
                                      (substring str i))
                                (setq term-terminal-state 4)

-- 
Harry Kuiper                 address@hidden
Haarlem, The Netherlands



reply via email to

[Prev in Thread] Current Thread [Next in Thread]