Fork me on GitHub
#emacs
<
2017-03-01
>
qqq14:03:36

I have two points. Is there a way to say "get the region between these two points as a string" ?

dpsutton14:03:23

what package are you using to have two points?

qqq14:03:19

(save-recursion .... some action ... (point))

qqq14:03:28

sorry, maybe I should have used phrase "two locations" I only have 1 point

qqq14:03:42

so I want the string between (save-recursion ... body ... (point)) and (point)

qqq14:03:59

save-excursion

dpsutton15:03:55

there's marker and point

dpsutton15:03:01

which is probably what you want

dpsutton15:03:08

in emacs slang called the region

dpsutton15:03:52

(buffer-substring-no-properties (marker) (point))