Browse Source

Allow unrestricted completion on properties

Carsten Dominik 15 years ago
parent
commit
e8ec6d6d11
4 changed files with 28 additions and 3 deletions
  1. 11 0
      lisp/ChangeLog
  2. 4 1
      lisp/org-colview-xemacs.el
  3. 7 1
      lisp/org-colview.el
  4. 6 1
      lisp/org.el

+ 11 - 0
lisp/ChangeLog

@@ -1,5 +1,16 @@
 2009-12-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* 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

+ 4 - 1
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))

+ 7 - 1
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))

+ 6 - 1
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)