1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-26 07:33:39 +00:00

Turn off partial-completion-mode for special org completion

Report and patch by Levin Du.
This commit is contained in:
Carsten Dominik 2009-10-20 14:29:58 +02:00
parent f376feb5fb
commit e8e296128e
2 changed files with 22 additions and 18 deletions

View File

@ -1,5 +1,8 @@
2009-10-20 Carsten Dominik <carsten.dominik@gmail.com>
* 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.

View File

@ -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."