Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!sri-spam!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!hp-pcd!uoregon!omepd!mipos3!cpocd2!nate From: nate@cpocd2.UUCP (Nathan Hess) Newsgroups: comp.emacs Subject: Re: Setting terminal-emulator's environment Message-ID: <1043@cpocd2.UUCP> Date: 17 Dec 87 17:17:58 GMT References: <261@bernina.UUCP> Reply-To: nate@cpocd2.UUCP (Nathan Hess) Organization: Intel Corp., ASIC Services Operation, Chandler AZ Lines: 26 Keywords: GNU Emacs function `terminal-emulator' Summary: Yes, it can be done. In article <261@bernina.UUCP> heiser@ethz.UUCP (Gernot Heiser) writes: > [...] A better way would be to set the environment from the >`terminal-mode-hook'. Is there any means to achieve this???? (I'm running GNU >Emacs version 18.49.) Yes, there most definitely is a means to achieve this. Here is a part of my 'terminal-mode-hook' definition, which I have in my .emacs. It's kind of grungy, but, as they say, it works. If anyone knows of a better/faster/cleaner way of doing this, please pass it along! (setq terminal-mode-hook '(lambda () (define-key terminal-escape-map "B" 'bury-buffer) [...] (if (string-equal (buffer-name (current-buffer)) "*Emacs tcsh*") (progn (sit-for 6 t) ; Let tcsh kick up (send-string te-process "aliases;set prompt='tcsh<%\\!> ';stty dec tostop;setenv VISUAL '/usr/users/gnu/emacs/etc/emacsclient';setenv MORE -c;clear;w;echo ''\n") (te-process-output t))))) -- "How did you get your mind to tilt like your hat?" ...!{decwrl|hplabs!oliveb|pur-ee|qantel|amd}!intelca!mipos3!cpocd2!nate : nate@cpocd2.intel.com ATT : (602) 961-2037