Bash's magic for telling term.el what directory it's in overrides the default-directory set in term-handle-ansi-terminal-messages. It would be better if term-handle-ansi-terminal-messages overrode what bash says.
If the EMACS environment variable contains "term" Bash assumes it's running inside of Emacs in a term.el window and sends "\032/the/dir/bash/is/in\n" to tell term.el what directory it is in. term.el uses this to set default-directory. You can send other escape sequences to term.el to make it set default-directory. For example, 'ESCAnSiTc /home/happy' tells term.el I'm in /home/happy. Besides 'c' for directory you can use 'h' for host and 'u' for user. I use all of this to set default-directory to something TRAMP-friendly in terms on remote machines. That way I can use C-x C-f to edit files on the remote host (whether I'm a regular user or root). I can't find a combination of AnSiT settings which sets default-directory correctly when you are root on the machine on which Emacs is running. In that case I pretend that I'm on a remote machine and make default-directory be something like: /multi:ssh:[EMAIL PROTECTED]:su:[EMAIL PROTECTED]:/home/happy/ term-handle-ansi-terminal-messages sets default-directory to this but term.el immediately resets default-directory to what Bash told it. Since Bash's behavior is automatic and have to go out of your way to send AnSiT sequences, I think the AnSiT sequences should take precedence. _______________________________________________ Emacs-pretest-bug mailing list Emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug