From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Schmitt Newsgroups: gmane.emacs.devel Subject: completion discrepancy between default completion and helm/ivy completions Date: Thu, 10 Nov 2016 12:22:42 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1478777052 4936 195.159.176.226 (10 Nov 2016 11:24:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 Nov 2016 11:24:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 10 12:24:07 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4nSJ-0006wN-Mf for ged-emacs-devel@m.gmane.org; Thu, 10 Nov 2016 12:23:43 +0100 Original-Received: from localhost ([::1]:45579 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4nSM-0001PG-RI for ged-emacs-devel@m.gmane.org; Thu, 10 Nov 2016 06:23:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c4nSH-0001Ol-1r for emacs-devel@gnu.org; Thu, 10 Nov 2016 06:23:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c4nSD-00083E-UP for emacs-devel@gnu.org; Thu, 10 Nov 2016 06:23:41 -0500 Original-Received: from [195.159.176.226] (port=52733 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c4nSD-00082Z-Nn for emacs-devel@gnu.org; Thu, 10 Nov 2016 06:23:37 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1c4nS0-0004hT-Fw for emacs-devel@gnu.org; Thu, 10 Nov 2016 12:23:24 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 57 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:O7I0QhoByZIUBwagvA9LjNY17B8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209323 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2016-10: 401.57, 2015-10: = 398.29 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJYJFiDAAoJEAQNCjtO0uXHjqoIAM4ntt4ce8peB3z2UNgMmzRW 8W9tQtjlXWdm049vFPCMBfNmaXytMut/ooGSVY6uU8K1k3SkPNrw6zGxEZEvgDkQ BZTBP3FIW7E+jIUjj6773o676KL1inhG4QCXdQsk/uZ5z3JTIWhDXDE+YHctfSkz QDncgS7vfsv+Y3Vz+g4c+4b8pdjgH/OyBHa+TAw3xW4oV3tAVMRMQ1oWAVPwl8oY 20JloGuzGc+8tyIq1x86UuvmmP7m3o6pbqd9X7QfagiCE733CfCM1Vr3EC9QZBts Uuyf1x8K+Uj7nGWNLMb0ZULNrdg1AT/l7sskq/mt11O3cquYv0MxFPf6Je4Jx2M= =rZMl -----END PGP SIGNATURE----- --=-=-=--