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

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

term.el doesn't handle ^Z/


From: Daiki Ueno
Subject: term.el doesn't handle ^Z/
Date: Thu, 31 Jan 2002 12:22:06 +0900

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2001-11-05 on aquair
configured using `configure  --with-xpm --with-jpeg --with-tiff --with-gif 
--with-png --with-x'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  locale-coding-system: nil
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:


I incidentally found a minor bug in term.el.

Set the following script to explicit-shell-file-name and start eterm
by hitting M-x term.  It sometimes happens that the shell's pwd
doesn't match the buffer's current directory.

#!/bin/sh
cd $HOME
exec /bin/sh "$@"

Here is the patch to fix this.

2002-01-31  Daiki Ueno  <ueno@unixuser.org>

        * term.el (term-emulate-terminal): Extract proper command string
        which is supplied to term-command-hook.

--- term.el~    Thu Jan 31 11:46:57 2002
+++ term.el     Thu Jan 31 11:48:48 2002
@@ -2855,11 +2855,11 @@ (defun term-emulate-terminal (proc str)
                           ((eq char ?\^G)
                            (beep t)) ; Bell
                           ((eq char ?\032)
-                           (let ((end (string-match "\n" str i)))
+                           (let ((end (string-match "\r?$" str i)))
                              (if end
                                  (progn (funcall term-command-hook
-                                                 (substring str (1+ i) (1- 
end)))
-                                        (setq i end))
+                                                 (substring str (1+ i) end))
+                                        (setq i (match-end 0)))
                                (setq term-terminal-parameter
                                      (substring str i))
                                (setq term-terminal-state 4)

Recent input:
<escape> x r e p o t r <backspace> <backspace> r t 
SPC <tab> <return>

Recent messages:
`completer' is not found.
Loading habbrev...done
`un-define' is not found.
`iiimcf-sc' is not found.
Loading /home/ueno/.emacs/init...done
Loading /home/ueno/.emacs/custom (source)...
Loading regexp-opt...done
Loading /home/ueno/.emacs/custom (source)...done
For information about the GNU Project and its goals, type C-h C-p.
Loading emacsbug...done

-- 
Daiki Ueno



reply via email to

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