Got line-mode to work as for this: in term-mode, how do I run regular emacs commands?
Now how do I make it the default ?
Got line-mode to work as for this: in term-mode, how do I run regular emacs commands?
Now how do I make it the default ?
Looking at term.el it seems char mode is enabled right after running term-mode (and hence term-mode-hook) as such enabling term-line-mode in term-mode-hook would not work. The only option I can think of is advicing the function term and ansi-term, like so
(defun my-enable-term-line-mode (&rest ignored)
(term-line-mode))
(advice-add 'ansi-term :after #'my-enable-term-line-mode)
(advice-add 'term :after #'my-enable-term-line-mode)
However you loose all the goodness of term in line mode, if you are looking for line-mode behaviour I think you will be better served by shell (M-xshellRET) or even better eshell.