Function: org-src--coordinates
org-src--coordinates is a byte-compiled function defined in
org-src.el.gz.
Signature
(org-src--coordinates POS BEG END)
Documentation
Return coordinates of POS relatively to BEG and END.
POS, BEG and END are buffer positions. Return value is either
a cons cell (LINE . COLUMN) or symbol end. See also
org-src--goto-coordinates.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-src.el.gz
(defun org-src--coordinates (pos beg end)
"Return coordinates of POS relatively to BEG and END.
POS, BEG and END are buffer positions. Return value is either
a cons cell (LINE . COLUMN) or symbol `end'. See also
`org-src--goto-coordinates'."
(if (>= pos end) 'end
(org-with-wide-buffer
(goto-char (max beg pos))
(cons (count-lines (save-excursion (goto-char beg) (line-beginning-position))
(line-beginning-position))
;; Column is relative to the end of line to avoid problems of
;; comma escaping or colons appended in front of the line.
(- (point) (min end (line-end-position)))))))