emacs-devel
[Top][All Lists]
Advanced

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

completion discrepancy between default completion and helm/ivy completio


From: Alan Schmitt
Subject: completion discrepancy between default completion and helm/ivy completions
Date: Thu, 10 Nov 2016 12:22:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin)

Hello,

I'm tracking down a bug with org-contacts during completion, and I have
found the source to be a discrepancy between how default completion is
computed (using `completion-basic-try-completions') and how ivy/helm
completion is computed (using `completion-basic-all-completions').

In the first case, the result of the completion function is tested to be
a string, and tweaked if it is:

        (let ((completion (try-completion beforepoint table pred)))
          (if (not (stringp completion))
              completion
            (cons
             (concat completion
                     (completion--merge-suffix completion point afterpoint))
             (length completion))))

In the all-completions case, there is no such test, so the completion is
returned as such.

In org-contacts, the completion is defined as a function that returns is
a string, so it works with default completion but not with ivy or helm.

I would like to fix org-contacts so that it works well all the time.
Should it directly return a cons of the string and its length?

Thanks a lot for any help, and if this is not the place to ask such
questions, please let me know the right list.

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-10: 401.57, 2015-10: 398.29

Attachment: signature.asc
Description: PGP signature


reply via email to

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