I know one can mark the whole buffer with mark-whole-buffer.

but how does one mark from point (that line) to start of buffer?


I would do this:

  • C-SPC to set the mark
  • M-< to go to the beginning of the buffer

Or, if you want to finish with point where you started:

  • M-< to go to the beginning of the buffer (which sets the mark at point but does not activate the mark)
  • C-x C-x to activate the mark and swap mark and point.

If you do this a lot, you can define a command:

(defun mark-to-beginning-of-buffer ()
  "Marks the region from the beginning of the buffer to point."
  (push-mark (point-min) nil t))
  • @Gilles Good point, thanks for the edit. – glucas Feb 2 '17 at 1:24

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.