Function: org-save-markers-in-region

org-save-markers-in-region is a byte-compiled function defined in org.el.gz.

Signature

(org-save-markers-in-region BEG END)

Documentation

Check markers in region.

If these markers are between BEG and END, record their position relative to BEG, so that after moving the block of text, we can put the markers back into place. This function gets called just before an entry or tree gets cut from the buffer. After re-insertion, org-reinstall-markers-in-region must be called immediately, to move the markers with the entries.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defvar org-log-note-marker) ; defined later
(defun org-save-markers-in-region (beg end)
  "Check markers in region.
If these markers are between BEG and END, record their position relative
to BEG, so that after moving the block of text, we can put the markers back
into place.
This function gets called just before an entry or tree gets cut from the
buffer.  After re-insertion, `org-reinstall-markers-in-region' must be
called immediately, to move the markers with the entries."
  (setq org-markers-to-move nil)
  (org-check-and-save-marker org-log-note-marker beg end)
  (when (featurep 'org-clock)
    (org-clock-save-markers-for-cut-and-paste beg end))
  (when (featurep 'org-agenda)
    (org-agenda-save-markers-for-cut-and-paste beg end)))