get-start-position in text%

Returns the starting position of the current selection. See also get-position.