Merge branch 'maint'

This commit is contained in:
Bastien Guerry 2014-01-03 10:07:31 +01:00
commit af97893516
1 changed files with 8 additions and 3 deletions

View File

@ -15539,14 +15539,19 @@ Each hook function should accept two arguments, the name of the property
and the new value.")
(defun org-entry-put (pom property value)
"Set PROPERTY to VALUE for entry at point-or-marker POM."
"Set PROPERTY to VALUE for entry at point-or-marker POM.
If the value is `nil', it is converted to the empty string.
If it is not a string, an error is raised."
(cond ((null value) (setq value ""))
((not (stringp value))
(error "Properties values should be strings.")))
(org-with-point-at pom
(org-back-to-heading t)
(let ((beg (point)) (end (save-excursion (outline-next-heading) (point)))
range)
(cond
((equal property "TODO")
(when (and (stringp value) (string-match "\\S-" value)
(when (and (string-match "\\S-" value)
(not (member value org-todo-keywords-1)))
(user-error "\"%s\" is not a valid TODO state" value))
(if (or (not value)
@ -15555,7 +15560,7 @@ and the new value.")
(org-todo value)
(org-set-tags nil 'align))
((equal property "PRIORITY")
(org-priority (if (and value (stringp value) (string-match "\\S-" value))
(org-priority (if (and value (string-match "\\S-" value))
(string-to-char value) ?\ ))
(org-set-tags nil 'align))
((equal property "CLOCKSUM")