Function: org-export-install-filters

org-export-install-filters is a byte-compiled function defined in ox.el.gz.

Signature

(org-export-install-filters INFO)

Documentation

Install filters properties in communication channel.

INFO is a plist containing the current communication channel. Return the updated communication channel.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
(defun org-export-install-filters (info)
  "Install filters properties in communication channel.
INFO is a plist containing the current communication channel.
Return the updated communication channel."
  (let (plist)
    ;; Install user-defined filters with `org-export-filters-alist'
    ;; and filters already in INFO (through ext-plist mechanism).
    (dolist (p org-export-filters-alist)
      (let* ((prop (car p))
	     (info-value (plist-get info prop))
	     (default-value (symbol-value (cdr p))))
	(setq plist
	      (plist-put plist prop
			 ;; Filters in INFO will be called
			 ;; before those user provided.
			 (append (if (listp info-value) info-value
				   (list info-value))
				 default-value)))))
    ;; Prepend backend specific filters to that list.
    (dolist (p (org-export-get-all-filters (plist-get info :back-end)))
      ;; Single values get consed, lists are appended.
      (let ((key (car p)) (value (cdr p)))
	(when value
	  (setq plist
		(plist-put
		 plist key
		 (if (atom value) (cons value (plist-get plist key))
		   (append value (plist-get plist key))))))))
    ;; Return new communication channel.
    (org-combine-plists info plist)))