From e8ec6d6d115cbaf09cffd54f4634789cb2081187 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 11 Dec 2009 08:44:35 +0100 Subject: [PATCH] Allow unrestricted completion on properties --- lisp/ChangeLog | 11 +++++++++++ lisp/org-colview-xemacs.el | 5 ++++- lisp/org-colview.el | 8 +++++++- lisp/org.el | 7 ++++++- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b67a812d0..acab623be 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2009-12-11 Carsten Dominik + * org-colview-xemacs.el (org-columns-edit-value): Use + org-unrestricted property. + + * org-colview.el (org-columns-edit-value): Use + org-unrestricted property. + + * org.el (org-compute-property-at-point): Set org-unrestricted + text property if the list contains ":ETC". + (org-insert-property-drawer): Use + org-unrestricted property. + * org-exp.el (org-export-preprocess-before-selecting-backend-code-hook): New hook. (org-export-preprocess-string): Run diff --git a/lisp/org-colview-xemacs.el b/lisp/org-colview-xemacs.el index 50348504f..f12d6a977 100644 --- a/lisp/org-colview-xemacs.el +++ b/lisp/org-colview-xemacs.el @@ -638,7 +638,10 @@ Where possible, use the standard interface for changing this line." (t (setq allowed (org-property-get-allowed-values pom key 'table)) (if allowed - (setq nval (org-icompleting-read "Value: " allowed nil t)) + (setq nval (org-icompleting-read + "Value: " allowed nil + (not (get-text-property 0 'org-unrestricted + (caar allowed))))) (setq nval (read-string "Edit: " value))) (setq nval (org-trim nval)) (when (not (equal nval value)) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 7f86eccec..cf8890b2a 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -459,10 +459,16 @@ Where possible, use the standard interface for changing this line." ((equal key "SCHEDULED") (setq eval '(org-with-point-at pom (call-interactively 'org-schedule)))) + ((equal key "BEAMER_env") + (setq eval '(org-with-point-at pom + (call-interactively 'org-beamer-set-environment-tag)))) (t (setq allowed (org-property-get-allowed-values pom key 'table)) (if allowed - (setq nval (org-icompleting-read "Value: " allowed nil t)) + (setq nval (org-icompleting-read + "Value: " allowed nil + (not (get-text-property 0 'org-unrestricted + (caar allowed))))) (setq nval (read-string "Edit: " value))) (setq nval (org-trim nval)) (when (not (equal nval value)) diff --git a/lisp/org.el b/lisp/org.el index a32237229..3cae0dd7f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -12710,7 +12710,9 @@ in the current file." (allowed (org-property-get-allowed-values nil prop 'table)) (existing (mapcar 'list (org-property-values prop))) (val (if allowed - (org-completing-read "Value: " allowed nil 'req-match) + (org-completing-read "Value: " allowed nil + (not (get-text-property 0 'org-unrestricted + (caar allowed)))) (let (org-completion-use-ido org-completion-use-iswitchb) (org-completing-read (concat "Value " (if (and cur (string-match "\\S-" cur)) @@ -12794,6 +12796,9 @@ completion." ((symbolp x) (symbol-name x)) (t "???"))) vals))))) + (when (member ":ETC" vals) + (setq vals (remove ":ETC" vals)) + (org-add-props (car vals) '(org-unrestricted t))) (if table (mapcar 'list vals) vals))) (defun org-property-previous-allowed-value (&optional previous)