all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Harry Kuiper <hkuiper@xs4all.nl>
Cc: Eli Zaretskii <eliz@is.elta.co.il>,  bug-gnu-emacs@gnu.org
Subject: Re: term.el (term-emulate-terminal)
Date: 13 Apr 2002 22:31:19 +0200	[thread overview]
Message-ID: <878z7r2ve0.fsf@mumon.localnet> (raw)
In-Reply-To: <f0460f7c-f8e9-4c5d-b69f-5916b92082b0@deisui.org>

Daiki Ueno <ueno@unixuser.org> 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

  reply	other threads:[~2002-04-13 20:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-13 13:40 term.el (term-emulate-terminal) Harry Kuiper
2002-04-13 15:36 ` Eli Zaretskii
2002-04-13 17:25   ` Daiki Ueno
2002-04-13 18:15     ` Eli Zaretskii
2002-04-13 18:56     ` Harry Kuiper
2002-04-13 19:24       ` Daiki Ueno
2002-04-13 20:31         ` Harry Kuiper [this message]
2002-04-13 21:54           ` Harry Kuiper
2002-04-13 22:31             ` Harry Kuiper
2002-04-14  1:17               ` Daiki Ueno
2002-04-14  6:48                 ` Harry Kuiper
2002-04-16 18:52                   ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=878z7r2ve0.fsf@mumon.localnet \
    --to=hkuiper@xs4all.nl \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=eliz@is.elta.co.il \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.