Like if you have a buffer containing
hel! and paste in
lo world after the third letter you get 4 and 11 respectively?
Emacs has many state variables, are there any that could help me in this case?
These are just point and mark right after the yank command. Just see the doc for
One more thing: If you want to see these values just once you can call M-:
Here's a quick snippet I came up with that does what you need on brief testing.