Function: goto-char

goto-char is an interactive function defined in editfns.c.

Signature

(goto-char POSITION)

Documentation

Set point to POSITION, a number or marker.

Beginning of buffer is position (point-min), end is (point-max).

The return value is POSITION.

If called interactively, a numeric prefix argument specifies POSITION; without a numeric prefix argument, read POSITION from the minibuffer. The default value is the number at point (if any).

Other relevant functions are documented in the buffer group.

View in manual

Probably introduced at or before Emacs version 18.

Key Bindings

Shortdoc

;; buffer
(goto-char (point-max))
    e.g. => 342

Source Code

// Defined in /usr/src/emacs/src/editfns.c
{
  if (MARKERP (position))
    set_point_from_marker (position);
  else if (FIXNUMP (position))
    SET_PT (clip_to_bounds (BEGV, XFIXNUM (position), ZV));
  else
    wrong_type_argument (Qinteger_or_marker_p, position);
  return position;
}