Function: org-set-property-and-value

org-set-property-and-value is an interactive and byte-compiled function defined in org.el.gz.

Signature

(org-set-property-and-value USE-LAST)

Documentation

Allow setting [PROPERTY]: [value] direction from prompt.

When use-default, don't even ask, just use the last
"[PROPERTY]: [value]" string from the history.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-set-property-and-value (use-last)
  "Allow setting [PROPERTY]: [value] direction from prompt.
When use-default, don't even ask, just use the last
\"[PROPERTY]: [value]\" string from the history."
  (interactive "P")
  (let* ((completion-ignore-case t)
	 (pv (or (and use-last org-last-set-property-value)
		 (org-completing-read
		  "Enter a \"[Property]: [value]\" pair: "
		  nil nil nil nil nil
		  org-last-set-property-value)))
	 prop val)
    (when (string-match "^[ \t]*\\([^:]+\\):[ \t]*\\(.*\\)[ \t]*$" pv)
      (setq prop (match-string 1 pv)
	    val (match-string 2 pv))
      (org-set-property prop val))))