Browse Source

Fix `org-set-property'.

* org.el (org-properties-postprocess-alist): Better
customization type.
(org-set-property): Fix the check against
`org-properties-postprocess-alist'.

Thanks to Bill Wishon for testing/spotting this.
Bastien Guerry 13 years ago
parent
commit
e7dda77691
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org.el

+ 3 - 2
lisp/org.el

@@ -3073,7 +3073,8 @@ and the clock summary:
                      (org-minutes-to-hh:mm-string (- effort clocksum))))))"
   :group 'org-properties
   :version "24.1"
-  :type 'alist)
+  :type '(alist :key-type (string     :tag "Property")
+		:value-type (function :tag "Function")))
 
 (defcustom org-use-property-inheritance nil
   "Non-nil means properties apply also for sublevels.
@@ -14714,7 +14715,7 @@ in the current file."
   (interactive (list nil nil))
   (let* ((property (or property (org-read-property-name)))
 	 (value (or value (org-read-property-value property)))
-	 (fn (cadr (assoc property org-properties-postprocess-alist))))
+	 (fn (cdr (assoc property org-properties-postprocess-alist))))
     (setq org-last-set-property property)
     ;; Possibly postprocess the inserted value:
     (when fn (setq value (funcall fn value)))