1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-25 07:27:57 +00:00

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.
This commit is contained in:
Øyvind Stegard 2013-06-10 11:08:56 +02:00 committed by Grégoire Jadi
parent 1a8ad7dab1
commit d3fb1812fa

View File

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