Function: org-indent-initialize-agent

org-indent-initialize-agent is a byte-compiled function defined in org-indent.el.gz.

Signature

(org-indent-initialize-agent)

Documentation

Start or resume current buffer initialization.

Only buffers in org-indent-agentized-buffers trigger an action. When no more buffer is being watched, the agent suppress itself.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-indent.el.gz
(defun org-indent-initialize-agent ()
  "Start or resume current buffer initialization.
Only buffers in `org-indent-agentized-buffers' trigger an action.
When no more buffer is being watched, the agent suppress itself."
  (when org-indent-agent-resume-timer
    (cancel-timer org-indent-agent-resume-timer))
  (setq org-indent-agentized-buffers
	(cl-remove-if-not #'buffer-live-p org-indent-agentized-buffers))
  (cond
   ;; Job done:  kill agent.
   ((not org-indent-agentized-buffers) (cancel-timer org-indent-agent-timer))
   ;; Current buffer is agentized: start/resume initialization
   ;; somewhat aggressively.
   ((memq (current-buffer) org-indent-agentized-buffers)
    (org-indent-initialize-buffer (current-buffer)
				  org-indent-agent-active-delay))
   ;; Else, start/resume initialization of the last agentized buffer,
   ;; softly.
   (t (org-indent-initialize-buffer (car org-indent-agentized-buffers)
				    org-indent-agent-passive-delay))))