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

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

need for a shell-mode-post-hook ?


From: Matthew Kennedy
Subject: need for a shell-mode-post-hook ?
Date: Wed, 05 Mar 2003 09:07:10 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

My ~/.emacs_bash contains the following:

,----[ .emacs_bash ]
|
| PS1='\u@\h \W \$ '
`----

When I start shell with M-x shell RET, I get several prompts across
the top of the buffer.  It looks pretty tacky to me.  So I thought of
adding "clear" to the end of ~/.emacs_bash, however since its not
terminal-connected, clear has no effect (I think?).

So I'm wondering if there is a good case for a kind of
shell-mode-post-hook that would allow a hook *after* the start file
(~/.emacs_bash) is sent to the bash process via. comint.  What I am
getting at is something like this:

        (add-hook 'shell-mode-post-hook '(erase-buffer))

(followed possibly by sending a single, initial RET to the bash
process to force the prompt to show).

Perhaps there's an alternate way to achieve this? (as opposed to
editing my shell.el in the site-wide emacs lisp/ dir).

Matt

-- 
Matthew Kennedy


reply via email to

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