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: term.el (term-emulate-terminal) Date: 13 Apr 2002 22:31:19 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <878z7r2ve0.fsf@mumon.localnet> References: <87k7rb3ee1.fsf@mumon.localnet> <8962-Sat13Apr2002183653+0300-eliz@is.elta.co.il> <7fea2bbd-6176-4969-88ea-fa458a704344@deisui.org> <87elhj2zs3.fsf@mumon.localnet> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1018729991 30554 127.0.0.1 (13 Apr 2002 20:33:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2002 20:33:11 +0000 (UTC) Cc: Eli Zaretskii , bug-gnu-emacs@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16wUCt-0007wh-00 for ; Sat, 13 Apr 2002 22:33:11 +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 16wUCu-0004z2-00; Sat, 13 Apr 2002 16:33:12 -0400 Original-Received: from node-c-4639.a2000.nl ([62.194.70.57] helo=mumon.localnet) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16wUBN-0004Ic-00 for ; Sat, 13 Apr 2002 16:31:37 -0400 Original-Received: from hkuiper by mumon.localnet with local (Exim 3.35 #1 (Debian)) id 16wUB5-0007Ct-00; Sat, 13 Apr 2002 22:31:19 +0200 Original-To: Daiki Ueno In-Reply-To: Original-Lines: 55 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:649 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:649 Daiki Ueno writes: > > Could you do M-: (setq debug-on-quit t) before entering term-mode, > type M-g, and send me the contents of the buffer named *Backtrace*? > I'll take a look at them and suppose that I can help you. When term hangs it is impossible to get out of it. Even typing C-g twice does not work. I can only kill Emacs from the commandline in an xterm. When I restart Emacs and try M-x recover-session there's a save file alright but Emacs says there is nothing to recover from it. Once Emacs hangs it starts to consume memory at a rate of 50 MB in 30 seconds or so. I noticed one strange thing. The shell prompt is printed twice when I just press enter without entering a command. The term.el version that does not cause problems does not do this. I tried to reproduce your original problem using the script: #!/bin/sh cd $HOME exec /bin/sh "$@" But it seems to work OK for me. No problems. Just to make sure we are talking about the same code, below is a diff of the broken version (term.el.broken) against my version that seems to work (term.el): cd /usr/local/share/emacs/21.2/lisp/ diff -u /usr/local/share/emacs/21.2/lisp/term.el.broken /usr/local/share/emacs/21.2/lisp/term.el --- /usr/local/share/emacs/21.2/lisp/term.el.broken Sun Feb 3 12:56:52 2002 +++ /usr/local/share/emacs/21.2/lisp/term.el Sat Apr 13 14:58:06 2002 @@ -2830,11 +2830,11 @@ ((eq char ?\^G) (beep t)) ; Bell ((eq char ?\032) - (let ((end (string-match "\r?$" str i))) + (let ((end (string-match "\n" str i))) (if end (progn (funcall term-command-hook - (substring str (1+ i) end)) - (setq i (match-end 0))) + (substring str (1+ i) (1- end))) + (setq i end)) (setq term-terminal-parameter (substring str i)) (setq term-terminal-state 4) Anything else I can do to help? -- Harry Kuiper hkuiper@xs4all.nl Haarlem, The Netherlands