From 566a4c7f3ab9289282320e055c78900e0b623d14 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 29 Jun 2010 09:26:51 +0200 Subject: [PATCH] Restore the proper functionality for org-iswitchb * lisp/org.el (org-iswitchb): Make sure to use at least iswitchb. Patch by Stephen Eglen (modified). --- lisp/org.el | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index a079179b4..1abf73ae0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15228,11 +15228,20 @@ changes from another. I believe the procedure must be like this: (defun org-iswitchb (&optional arg) "Use `org-icompleting-read' to prompt for an Org buffer to switch to. With a prefix argument, restrict available to files. -With two prefix arguments, restrict available buffers to agenda files." +With two prefix arguments, restrict available buffers to agenda files. + +This will either use ido or iswitchb for buffer name completion, +depending on the variables `org-completion-use-iswitchb' and +`org-completion-use-ido'. If both are nil, we will still use iswitchb +for this special application." (interactive "P") (let ((blist (cond ((equal arg '(4)) (org-buffer-list 'files)) ((equal arg '(16)) (org-buffer-list 'agenda)) - (t (org-buffer-list))))) + (t (org-buffer-list)))) + (org-completion-use-iswitchb org-completion-use-iswitchb) + (org-completion-use-ido org-completion-use-ido)) + (unless (or org-completion-use-ido org-completion-use-iswitchb) + (setq org-completion-use-iswitchb t)) (switch-to-buffer (org-icompleting-read "Org buffer: " (mapcar 'list (mapcar 'buffer-name blist))