Function: org-columns--displayed-value

org-columns--displayed-value is a byte-compiled function defined in org-colview.el.gz.

Signature

(org-columns--displayed-value SPEC VALUE &optional NO-STAR)

Documentation

Return displayed value for specification SPEC in current entry.

SPEC is a column format specification as stored in org-columns-current-fmt-compiled. VALUE is the real value to display, as a string.

When NO-STAR is non-nil, do not add asterisks before displayed value for ITEM property.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-colview.el.gz
(defun org-columns--displayed-value (spec value &optional no-star)
  "Return displayed value for specification SPEC in current entry.

SPEC is a column format specification as stored in
`org-columns-current-fmt-compiled'.  VALUE is the real value to
display, as a string.

When NO-STAR is non-nil, do not add asterisks before displayed
value for ITEM property."
  (or (and (functionp org-columns-modify-value-for-display-function)
	   (funcall org-columns-modify-value-for-display-function
		    (nth 1 spec)	;column name
		    value))
      (pcase spec
	(`("ITEM" . ,_)
	 (let ((stars
		(and (not no-star)
		     (concat (make-string (1- (org-current-level))
					  (if org-hide-leading-stars ?\s ?*))
			     "* "))))
	   (concat stars (org-link-display-format value))))
	(`(,(or "DEADLINE" "SCHEDULED" "TIMESTAMP") . ,_)
	 (replace-regexp-in-string org-ts-regexp "[\\1]" value))
	(`(,_ ,_ ,_ ,_ nil) value)
	;; If PRINTF is set, assume we are displaying a number and
	;; obey to the format string.
	(`(,_ ,_ ,_ ,_ ,printf) (format printf (string-to-number value)))
	(_ (error "Invalid column specification format: %S" spec)))))