0

I am having a problem with selecting text. The method I used to use and which is suggested elsewhere no longer works for me. I want to select a (long) region, so it is time-consuming to use the mouse.

I set the mark at the beginning, with C-Space, then go to the point at the end with C-S. But then the first mark has disappeared and the region is not highlighted.

This is the same method suggested elsewhere, and used to work for me (unless I am forgetting something!)

How to select or highlight a block in Emacs?

Drew
  • 29,895
  • 7
  • 74
  • 104
Albert
  • 89
  • 1
  • 1
  • 3
  • When you C-space then move, the region **is** highlighted. It is basic emacs behavior and there no reason to malfunction. Maybe a matter of mode? Have you tried whith a fresh emacs session? – Alain Merigot Jun 03 '19 at 18:48

2 Answers2

2

I doubt that the mark has been lost. More likely, you performed some action (sometimes scrolling can do this) that deactivated the region, that is, removed its highlighting. The region (the text between point and mark) is still present; it just isn't highlighted.

If this happens you can highlight the region again by using C-x C-x. That swaps point and mark, so if you want to keep the cursor at the same end of the region then just do it twice: C-x C-x.

Drew
  • 29,895
  • 7
  • 74
  • 104
2

The highlighting depends on whether transient-mark-mode is active. If it is not active, you can temporarily activate it by pressing C-Spc twice, then moving. Note that the region is defined between last mark and point, whether highlighted or not, and you can push it to the kill ring with M-w.

For other tips, see this question.

Svante
  • 50,694
  • 11
  • 78
  • 122