Variable: eshell-confine-point-to-input

eshell-confine-point-to-input is a customizable variable defined in em-rebind.el.gz.

Value

t

Documentation

If non-nil, do not allow the point to leave the current input.

This is more difficult to do nicely in Emacs than one might think. Basically, the point-left attribute is added to the input text, and a function is placed on that hook to take the point back to eshell-last-output-end every time the user tries to move away. But since there are many cases in which the point _ought_ to move away
(for programmatic reasons), the variable
eshell-cannot-leave-input-list defines commands which are affected from this rule. However, this list is by no means as complete as it probably should be, so basically all one can hope for is that other people will left the point alone in the Eshell buffer. Sigh.

Source Code

;; Defined in /usr/src/emacs/lisp/eshell/em-rebind.el.gz
(defcustom eshell-confine-point-to-input t
  "If non-nil, do not allow the point to leave the current input.
This is more difficult to do nicely in Emacs than one might think.
Basically, the `point-left' attribute is added to the input text, and
a function is placed on that hook to take the point back to
`eshell-last-output-end' every time the user tries to move away.  But
since there are many cases in which the point _ought_ to move away
\(for programmatic reasons), the variable
`eshell-cannot-leave-input-list' defines commands which are affected
from this rule.  However, this list is by no means as complete as it
probably should be, so basically all one can hope for is that other
people will left the point alone in the Eshell buffer.  Sigh."
  :type 'boolean
  :group 'eshell-rebind)