From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harry Kuiper Newsgroups: gmane.emacs.bugs Subject: Re: emacs hangs in ansi-term Date: 20 Apr 2002 09:37:07 +0200 Organization: XS4ALL Internet BV Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <87r8laes7w.fsf@mumon.localnet> References: <16ycUS-1UQMBEC@fwd08.sul.t-online.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019288372 25520 127.0.0.1 (20 Apr 2002 07:39:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Apr 2002 07:39:32 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16ypT1-0006dV-00 for ; Sat, 20 Apr 2002 09:39:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16ypSv-0002dV-00; Sat, 20 Apr 2002 03:39:25 -0400 Original-Received: from news1.xs4all.nl ([194.109.6.74]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16ypQl-0002Ti-00 for ; Sat, 20 Apr 2002 03:37:12 -0400 Original-Received: by news1.xs4all.nl (8.9.0/8.9.0) id JAA23012 for gnu-emacs-bug@prep.ai.mit.edu; Sat, 20 Apr 2002 09:37:10 +0200 (CEST) Original-To: gnu-emacs-bug@prep.ai.mit.edu Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 50 Original-NNTP-Posting-Host: node-c-4639.a2000.nl Original-X-Trace: news1.xs4all.nl 1019288230 21220 62.194.70.57 (20 Apr 2002 07:37:10 GMT) Original-X-Complaints-To: abuse@xs4all.nl Original-NNTP-Posting-Date: 20 Apr 2002 07:37:10 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:821 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:821 Harald.Maier.BW@t-online.de writes: > 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 hkuiper@xs4all.nl Haarlem, The Netherlands