Completion: Allow spaces in some fields
Org has a number of places where the value read by completing-read may contains spaces. For these occasions, the space character needs to be a normal character. The recent support for ido.el invalidated these special cases because ido has its own way of dealing with spaces. This commit now makes sure that ido is off for the critical cases where completion must allow spaces.
This commit is contained in:
parent
933d88ef3e
commit
3c121459b4
|
@ -1,5 +1,12 @@
|
|||
2009-02-20 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-remember.el (org-remember-apply-template): Use
|
||||
`org-completing-read-no-ido'.
|
||||
|
||||
* org.el (org-completing-read-no-ido): New function.
|
||||
(org-make-tags-matcher, org-set-property): Use
|
||||
`org-completing-read-no-ido'.
|
||||
|
||||
* org-export-latex.el (org-export-latex-import-inbuffer-stuff):
|
||||
New option.
|
||||
(org-export-as-latex): Import in-buffer settings as TeX macros.
|
||||
|
|
|
@ -538,7 +538,7 @@ to be run from that hook to function properly."
|
|||
propprompt
|
||||
(mapcar 'list (org-split-string allowed "[ \t]+"))
|
||||
nil 'req-match)
|
||||
(org-completing-read propprompt existing nil nil
|
||||
(org-completing-read-no-ido propprompt existing nil nil
|
||||
"" nil ""))))
|
||||
(org-set-property prop val)))
|
||||
(char
|
||||
|
@ -551,7 +551,7 @@ to be run from that hook to function properly."
|
|||
nil nil (list org-end-time-was-given)))
|
||||
(t
|
||||
(let (org-completion-use-ido)
|
||||
(insert (org-completing-read
|
||||
(insert (org-completing-read-no-ido
|
||||
(concat (if prompt prompt "Enter string")
|
||||
(if default (concat " [" default "]"))
|
||||
": ")
|
||||
|
|
|
@ -7043,6 +7043,10 @@ used as the link location instead of reading one interactively."
|
|||
(org-defkey minibuffer-local-completion-map "?" 'self-insert-command)
|
||||
(apply 'org-ido-completing-read args)))
|
||||
|
||||
(defun org-completing-read-no-ido (&rest args)
|
||||
(let (org-completion-use-ido)
|
||||
(apply 'org-completing-read args)))
|
||||
|
||||
(defun org-ido-completing-read (&rest args)
|
||||
"Completing-read using `ido-mode' speedups if available"
|
||||
(if (and org-completion-use-ido
|
||||
|
@ -9838,7 +9842,7 @@ also TODO lines."
|
|||
;; Get a new match request, with completion
|
||||
(let ((org-last-tags-completion-table
|
||||
(org-global-tags-completion-table)))
|
||||
(setq match (org-completing-read
|
||||
(setq match (org-completing-read-no-ido
|
||||
"Match: " 'org-tags-completion-function nil nil nil
|
||||
'org-tags-history))))
|
||||
|
||||
|
@ -11082,11 +11086,12 @@ in the current file."
|
|||
(existing (mapcar 'list (org-property-values prop)))
|
||||
(val (if allowed
|
||||
(org-completing-read "Value: " allowed nil 'req-match)
|
||||
(let (org-completion-use-ido)
|
||||
(org-completing-read
|
||||
(concat "Value" (if (and cur (string-match "\\S-" cur))
|
||||
(concat "[" cur "]") "")
|
||||
": ")
|
||||
existing nil nil "" nil cur))))
|
||||
existing nil nil "" nil cur)))))
|
||||
(list prop (if (equal val "") cur val))))
|
||||
(unless (equal (org-entry-get nil property) value)
|
||||
(org-entry-put nil property value)))
|
||||
|
|
Loading…
Reference in New Issue