Function: org-with-point-at

org-with-point-at is a macro defined in org-macs.el.gz.

Signature

(org-with-point-at POM &rest BODY)

Documentation

Move to buffer and point of point-or-marker POM for the duration of BODY.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-macs.el.gz
(defmacro org-with-point-at (pom &rest body)
  "Move to buffer and point of point-or-marker POM for the duration of BODY."
  (declare (debug (form body)) (indent 1))
  (org-with-gensyms (mpom)
    `(let ((,mpom ,pom))
       (save-excursion
	 (when (markerp ,mpom) (set-buffer (marker-buffer ,mpom)))
	 (org-with-wide-buffer
	  (goto-char (or ,mpom (point)))
	  ,@body)))))