From 64623274f0a040c452df43b2a3f7b23b0af8fd57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Stegard?= Date: Mon, 10 Jun 2013 11:08:56 +0200 Subject: [PATCH] org-contacts: Provide ordering when using cycle completion * contrib/lisp/org-contacts.el (org-contacts-metadata-prefix): Provide same function for cycle ordering as is used for display ordering in completion metadata. When using cycle completion style for contacts, by setting `completion-cycle-threshold' to some value, the ordering was not consistent with order of email addresses in contact definition, nor the order which was used for regular display completion. Fix that by also supplying sort function for cycle completion in metadata. --- contrib/lisp/org-contacts.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el index 5d63fcc..71f7bf4 100644 --- a/contrib/lisp/org-contacts.el +++ b/contrib/lisp/org-contacts.el @@ -452,7 +452,8 @@ prefixes rather than just the beginning of the string." (defun org-contacts-metadata-prefix (string collection predicate) '(metadata . - ((display-sort-function . org-contacts-display-sort-function)))) + ((cycle-sort-function . org-contacts-display-sort-function) + (display-sort-function . org-contacts-display-sort-function)))) (defun org-contacts-complete-group (start end string) "Complete text at START from a group. -- 1.8.1.2