This is a simplified version of a function in my .emacs file:
(defun ml/bash ()
"Start a terminal emulator in a new window."
(ansi-term (executable-find "bash")))
You can bind it to C-c a:
(global-set-key (kbd "C-c a") #'ml/bash)
From my point of view you should accept Cyberbisson's most useful answer. I'll give you a formal one and the way to determine that information for yourself.
Why can't I use this key
(global-set-key (kbd "M-o") 'other-window)
defined in my emacs config, in ansi-term char mode?
Are all meta keybindings simply passed raw to the terminal process?
It may be helpful for you to know that in char-mode, all C-x key sequences are mapped to C-c. You don't need to define your own key sequence for what you want, therefore, you can just do C-c C-o. As you suspected, this mode passes just about everything along to the terminal that is not prefixed.
I am wondering if one could adjust the above so that the ansi-term behaves like M-x shell in the sense of opening in a new window (in the current frame -- at the bottom, just like M-x shell does).
The canonical and most flexible way to customise such rules is via display-buffer-alist (see (emacs) Displaying Buffers and its subnodes, as well as the nodes ...
This command should do steps 1 and 3, run it in the buffer you open in step 2 (bind to a key, or rename to something shorter, as you like).
(defun isend-with-ansi-term ()
(let ((term-buf (get-buffer "*ansi-term*")))
(save-window-excursion ; Work around term.el's use of `switch-to-buffer'.
As user @wasamasa suggested in the comments, the solution is to apply a "process filter" function to the buffer that is receiving the STDOUT and STDERR output from the process. An example walk-through for the procedure would be this:
1) Create a list to maintain your processes and their related buffers:
(setq your-proc-list nil)
2) Start with a generic ...
This isn't the special case that you think it is.
In general, Meta key sequences can be used in terminals (and the inferior process might have its own use for M-x), so term char mode sends these keys to the terminal.
Just like M-x itself, M-f and M-b are bound to term-send-raw-meta in term char mode. The inferior process running in the terminal is simply ...