Function: org-columns-compile-format
org-columns-compile-format is a byte-compiled function defined in
org-colview.el.gz.
Signature
(org-columns-compile-format FMT)
Documentation
Turn a column format string FMT into an alist of specifications.
The alist has one entry for each column in the format. The elements of
that list are:
property the property name, as an upper-case string
title the title field for the columns, as a string
width the column width in characters, can be nil for automatic width
operator the summary operator, as a string, or nil
format a format string for computed values, or nil
This function updates org-columns-current-fmt-compiled.
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-colview.el.gz
(defun org-columns-compile-format (fmt)
"Turn a column format string FMT into an alist of specifications.
The alist has one entry for each column in the format. The elements of
that list are:
property the property name, as an upper-case string
title the title field for the columns, as a string
width the column width in characters, can be nil for automatic width
operator the summary operator, as a string, or nil
format a `format' string for computed values, or nil
This function updates `org-columns-current-fmt-compiled'."
(setq org-columns-current-fmt-compiled nil)
(let ((start 0))
(while (string-match
(rx "%"
(optional (group (+ digit)))
(group (one-or-more (in alnum "_-")))
(optional "(" (group (zero-or-more (not (any ")")))) ")")
(optional "{" (group (zero-or-more (not (any "}")))) "}")
(zero-or-more space))
fmt start)
(setq start (match-end 0))
(let* ((width (and (match-end 1) (string-to-number (match-string 1 fmt))))
(prop (match-string-no-properties 2 fmt))
(title (or (org-string-nw-p (match-string-no-properties 3 fmt)) prop))
(operator (org-string-nw-p (match-string-no-properties 4 fmt))))
(push (if (not operator) (list (upcase prop) title width nil nil)
(let (fmt)
(when (string-match ";" operator)
(setq fmt (substring operator (match-end 0)))
(setq operator (substring operator 0 (match-beginning 0))))
(list (upcase prop) title width operator fmt)))
org-columns-current-fmt-compiled)))
(setq org-columns-current-fmt-compiled
(nreverse org-columns-current-fmt-compiled))))