Path: utzoo!mnetor!uunet!husc6!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: questions about gnuemacs Message-ID: <22730@yale-celray.yale.UUCP> Date: 8 Feb 88 19:09:22 GMT References: <198@rtg.cme-durer.ARPA> <57600006@ccvaxa> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 28 In-reply-to: wombat@ccvaxa.UUCP In article <57600006@ccvaxa>, wombat@ccvaxa writes: > Another way around the ^M appearing when using rlogin problem is to put > the following into your .login file (assuming you use csh): > [csh code deleted] It would be more portable to write a simple emacs-lisp filter for the shell process (but I don't know which is more efficient). The following should do the job: ---------------------------------------------------------------------------- (defun shell-filter (proc string) (save-excursion (set-buffer (process-buffer proc)) (goto-char (point-max)) (let ((old-max (point))) (insert string) (subst-char-in-region old-max (point) ?\^m ?\ ))) (if (eq (process-buffer proc) (current-buffer)) (goto-char (point-max)))) (set-process-filter (get-buffer-process "*shell*") 'shell-filter) ---------------------------------------------------------------------------- -- Ashwin Ram -- ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,ucbvax,harvard,cmcl2,...}!yale!Ram-Ashwin BITNET: Ram@yalecs