(You say "a region", not "the region", so a guess is that you do not really mean the Emacs region.)
If your question is really about the Emacs region then the answer is no. Point (the cursor position) is always at one end of the region, and mark is always at the other end.
See the Emacs manual, node Mark for more information. [I found that node by going to the manual (C-h r
) and then asking it to look up region in the index, by using i region
).]
If your question is really about just highlighting a sequence of characters then the answer is yes, you can do that, without point and mark needing to be at the ends of the highlighted text. Here are some alternatives:
You can use the secondary selection to highlight a char sequence. And, like the region, you can then yank (aka paste) that selected text anywhere.
The vanilla way to select the text for the secondary selection is to drag the second mouse button (<mouse-2>
). But you can also assign keyboard keys to select and paste the secondary-selection text. If you use library second-sel.el
then you get this plus additional secondary-selection features.
There is at most one secondary selection at any given time. But you can highlight multiple sequences of characters and then use those highlighted sequences in various ways. Library Highlight is specifically for this. It gives you many ways to highlight such sequences (including dragging with the mouse, like using a highlighter pen) and many ways to use them.