What is the "standard" way to store some text obtained from a buffer into a variable?
The only way I could think of was to use something along the lines of
(let ((beg (point))) (end-of-line) (copy-region-as-kill beg (point))) and then store it with something like
(setq var1 (car kill-ring)).
That feels somehow "hacky" and I was wondering if there is another function to do this, that I overlooked?