emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-contacts 6f1a63da03 067/154: org-contacts: Provide


From: ELPA Syncer
Subject: [elpa] externals/org-contacts 6f1a63da03 067/154: org-contacts: Provide ordering when using cycle completion
Date: Fri, 9 Sep 2022 15:58:27 -0400 (EDT)

branch: externals/org-contacts
commit 6f1a63da0344bdbf5a95337c2861cfebe4bf2037
Author: Øyvind Stegard <oyvind.stegard@ifi.uio.no>
Commit: Grégoire Jadi <gregoire.jadi@gmail.com>

    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.
---
 org-contacts.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-contacts.el b/org-contacts.el
index 5d63fcce34..71f7bf4016 100644
--- a/org-contacts.el
+++ b/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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]