From e8e296128e3e0b5272bc4020ee2ce267dead5838 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 20 Oct 2009 14:29:58 +0200 Subject: [PATCH] Turn off partial-completion-mode for special org completion Report and patch by Levin Du. --- lisp/ChangeLog | 3 +++ lisp/org.el | 37 +++++++++++++++++++------------------ 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5ba652a9f..7d82123f4 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-10-20 Carsten Dominik + * org.el (org-icompleting-read): Turn off partial completion mode + for the duration of this completion round. + * org-latex.el (org-export-latex-fontify-headline): Protect TeX macros in author lines and similar stuff. diff --git a/lisp/org.el b/lisp/org.el index 9b1922f74..1e59335ef 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7803,24 +7803,25 @@ from." (iswitchb-read-buffer prompt))) (defun org-icompleting-read (&rest args) - "Completing-read using `ido-mode' or `iswitchb' speedups if available" - (if (and org-completion-use-ido - (fboundp 'ido-completing-read) - (boundp 'ido-mode) ido-mode - (listp (second args))) - (let ((ido-enter-matching-directory nil)) - (apply 'ido-completing-read (concat (car args)) - (if (consp (car (nth 1 args))) - (mapcar (lambda (x) (car x)) (nth 1 args)) - (nth 1 args)) - (cddr args))) - (if (and org-completion-use-iswitchb - (boundp 'iswitchb-mode) iswitchb-mode - (listp (second args))) - (apply 'org-iswitchb-completing-read (concat (car args)) - (mapcar (lambda (x) (car x)) (nth 1 args)) - (cddr args)) - (apply 'completing-read args)))) + "Completing-read using `ido-mode' or `iswitchb' speedups if available." + (org-without-partial-completion + (if (and org-completion-use-ido + (fboundp 'ido-completing-read) + (boundp 'ido-mode) ido-mode + (listp (second args))) + (let ((ido-enter-matching-directory nil)) + (apply 'ido-completing-read (concat (car args)) + (if (consp (car (nth 1 args))) + (mapcar (lambda (x) (car x)) (nth 1 args)) + (nth 1 args)) + (cddr args))) + (if (and org-completion-use-iswitchb + (boundp 'iswitchb-mode) iswitchb-mode + (listp (second args))) + (apply 'org-iswitchb-completing-read (concat (car args)) + (mapcar (lambda (x) (car x)) (nth 1 args)) + (cddr args)) + (apply 'completing-read args))))) (defun org-extract-attributes (s) "Extract the attributes cookie from a string and set as text property."