Function: org-export-filter-apply-functions
org-export-filter-apply-functions is a byte-compiled function defined
in ox.el.gz.
Signature
(org-export-filter-apply-functions FILTERS VALUE INFO)
Documentation
Call every function in FILTERS.
Functions are called with three arguments: a value, the export back-end name and the communication channel. First function in FILTERS is called with VALUE as its first argument. Second function in FILTERS is called with the previous result as its value, etc.
Functions returning nil are skipped. Any function returning the empty string ends the process, which returns the empty string.
Call is done in a LIFO fashion, to be sure that developer specified filters, if any, are called first.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox.el.gz
;;;; Filters Tools
;;
;; Internal function `org-export-install-filters' installs filters
;; hard-coded in back-ends (developer filters) and filters from global
;; variables (user filters) in the communication channel.
;;
;; Internal function `org-export-filter-apply-functions' takes care
;; about applying each filter in order to a given data. It ignores
;; filters returning a nil value but stops whenever a filter returns
;; an empty string.
(defun org-export-filter-apply-functions (filters value info)
"Call every function in FILTERS.
Functions are called with three arguments: a value, the export
back-end name and the communication channel. First function in
FILTERS is called with VALUE as its first argument. Second
function in FILTERS is called with the previous result as its
value, etc.
Functions returning nil are skipped. Any function returning the
empty string ends the process, which returns the empty string.
Call is done in a LIFO fashion, to be sure that developer
specified filters, if any, are called first."
(catch :exit
(let* ((backend (plist-get info :back-end))
(backend-name (and backend (org-export-backend-name backend))))
(dolist (filter filters value)
(let ((result (funcall filter value backend-name info)))
(cond ((not result))
((equal result "") (throw :exit ""))
(t (setq value result))))))))