Function: org-extract-log-state-settings

org-extract-log-state-settings is a byte-compiled function defined in org.el.gz.

Signature

(org-extract-log-state-settings X)

Documentation

Extract the log state setting from a TODO keyword string.

This will extract info from a string like "WAIT(w@/!)".

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-extract-log-state-settings (x)
  "Extract the log state setting from a TODO keyword string.
This will extract info from a string like \"WAIT(w@/!)\"."
  (when (string-match "^\\(.*?\\)\\(?:(\\([^!@/]\\)?\\([!@]\\)?\\(?:/\\([!@]\\)\\)?)\\)?$" x)
    (let ((kw (match-string 1 x))
	  (log1 (and (match-end 3) (match-string 3 x)))
	  (log2 (and (match-end 4) (match-string 4 x))))
      (and (or log1 log2)
	   (list kw
		 (and log1 (if (equal log1 "!") 'time 'note))
		 (and log2 (if (equal log2 "!") 'time 'note)))))))