Is there a key binding that moves the cursor to the last character in a buffer? I'm asking because I often find myself at a point other than the last character, where I want to be, in the interactive-shell.

  • 1
    The special-mode-map uses > for buffers like the *Help* buffer. [See simple.el.] The global-map uses C-end. [See bindings.el.] The esc-map uses > -- the esc key is bound by default to the Meta key on the GUI version of Emacs by way of the meta-prefix-char. [See bindings.el.] – lawlist Jul 26 '16 at 17:26
  • 1
    For Emacs versions built --with-ns -- i.e., OSX -- the library ns-win.el sets up two additional ways to trigger end-of-buffer with keyboard shortcuts -- i.e., end and kp-end. For example, I can type fn+right and go to the end of the buffer on my Mac. – lawlist Jul 26 '16 at 17:43

C-end (and M-> and another in default) runs command end-of-buffer (into simple.el), which moves cursor to the end of the buffer. With numeric argument, for example, C-u 4 C-end, moves point to 4/10 from the end of the accessable part. With narrowed buffer moves point into the narrowed path of the buffer.

You could find all the keybindings for function with C-h f end-of-buffer RET.

  • Yup. So M-> C-b puts point at (before) the last character. ;-) – Drew Jul 26 '16 at 18:27
  • And (goto-char (1- (point-max))) do the same (puts point before the last character). – Konstantin Morenko Jul 26 '16 at 18:47

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.