1

Since emacs 26.1 (changeset 8a1576cc03) I can't do M-x previous-line in term-char-mode. The cursor always returns to prompt line. On the other side, if I use the mouse or M-x scroll-down the cursor stay at the target point.

I try to write a function whitch can go up line by line in term-char-mode but without success. If someone has an idea, thanks.

  • I think you can set term-char-mode-point-at-process-mark to nil to avoid this (see its docstring). – npostavs Aug 24 '18 at 2:17
  • @npostavs Thanks a lot it works with (custom-set-variables '(term-char-mode-point-at-process-mark nil)) – djangoliv Aug 24 '18 at 7:53
2

You can set term-char-mode-point-at-process-mark to nil to disable this behaviour, otherwise it's not possible to write a command to circumvent it because the point is moved back after the command is run. This is mentioned in etc/NEWS of Emacs 26 (emphasis added):

*** 'term-char-mode' now makes its buffer read-only.

The buffer is made read-only to prevent changes from being made by anything other than the process filter; and movements of point away from the process mark are counter-acted so that the cursor is in the correct position after each command. This is needed to avoid states which are inconsistent with the state of the terminal understood by the inferior process.

New user options 'term-char-mode-buffer-read-only' and 'term-char-mode-point-at-process-mark' control these behaviors, and are non-nil by default. Customize these options to nil if you want the previous behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.