GNU bug report logs - #23852
25.0.95; lazy-completion-table discards metadata

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Michael Heerdegen <michael_heerdegen@HIDDEN>; dated Mon, 27 Jun 2016 02:22:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 23852 <at> debbugs.gnu.org:


Received: (at 23852) by debbugs.gnu.org; 27 Jun 2016 02:42:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 22:42:16 2016
Received: from localhost ([127.0.0.1]:57276 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bHMV6-0005Rm-L1
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:42:16 -0400
Received: from mail-oi0-f44.google.com ([209.85.218.44]:33029)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <npostavs@HIDDEN>) id 1bHMV5-0005Ra-Mi
 for 23852 <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:42:15 -0400
Received: by mail-oi0-f44.google.com with SMTP id u201so183374510oie.0
 for <23852 <at> debbugs.gnu.org>; Sun, 26 Jun 2016 19:42:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:from:date:message-id
 :subject:to:cc;
 bh=XOqf+zXrynWBefoPYfAOfl2bMzpJNVKb2XzZ/B+T1dE=;
 b=kC2Nn6w+/kB3VQD5fN4qOsZn9X0LMHbV90gH3K26a2jytDrot6hIETVf41vHc+o7Yq
 agngCUb8gQbQ5GyGFEC7yLBZhZ4EYI8yfSSL/nx5Qd7Mz70v6AxF35aNSwWtwcAsJrf0
 v3L3EtTh9TbeTPwcDEbmmvTuKn0y0mGMCoFr1XdCrQmp4XXZdln9PmLhfRjMf/h2huRN
 noq346LvpHHb9b0m1vginM4eLie7Felm6R/EW6qPmpYQuoCB4swBNceNmPqMpIoWF8pC
 XFwCTOiF1L+4Vu6/eF8MziQ6QooFjWF4o3/VW5tD0b7iaQV/eZc/3gw22EVaNDA09fj2
 v0dg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
 :date:message-id:subject:to:cc;
 bh=XOqf+zXrynWBefoPYfAOfl2bMzpJNVKb2XzZ/B+T1dE=;
 b=S/lUDyoABmVK1JaxWiKpAJZErZOYOlsHe1mwZ6xAVJ40lJJiGQyY0DixqyM2nd3APc
 hD1pGxA2WIhCalQ6OJ/5I8T5te2fxSUhbjewZjwo21cdYsMq1mLTsQ+rm/+w8gwlY7oh
 Rr9M+szk20QfJqvkZ/A5diRWMl8PPTw6U0fib05NUGQWWEYmBhg9mdkQCydDY+ouFykR
 rRwCggrJ0sSy2g8t2oTb5eRC9vuJglugbgYe05nrFwojmG3wipr0ck3iZ3Dge0vDkrAU
 ZeiMr9W7oaa87CueDM5a9DcK0/7AQyAHGganGj/j3ktLJ/hXJ8Bqos9tgu6A5M99W5U2
 V+pQ==
X-Gm-Message-State: ALyK8tKrZAXgdnO67zxdzCGNha/mpa+EoWJOEvbOrOp2wfQv53eSnZDGpmHStaLAqI+1xZcrSadrVpYfCQqHBQ==
X-Received: by 10.157.49.119 with SMTP id v52mr9961922otd.134.1466995330051;
 Sun, 26 Jun 2016 19:42:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.52.238 with HTTP; Sun, 26 Jun 2016 19:42:09 -0700 (PDT)
In-Reply-To: <877fdbv0bf.fsf@HIDDEN>
References: <877fdbv0bf.fsf@HIDDEN>
From: Noam Postavsky <npostavs@HIDDEN>
Date: Sun, 26 Jun 2016 22:42:09 -0400
X-Google-Sender-Auth: ywfJD-QMDp5bRJQwrqNfIvMmfDI
Message-ID: <CAM-tV-9eAN2kzitOHXXz4WTE-5nAmpOQtb=uw-mcQUyL05SE1A@HIDDEN>
Subject: Re: bug#23852: 25.0.95; lazy-completion-table discards metadata
To: Michael Heerdegen <michael_heerdegen@HIDDEN>
Content-Type: text/plain; charset=UTF-8
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 23852
Cc: 23852 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Sun, Jun 26, 2016 at 10:21 PM, Michael Heerdegen
<michael_heerdegen@HIDDEN> wrote:
> for example:
>
> (completing-read
>  "Input: "
>  (letrec ((table (lazy-completion-table
>                   table (lambda () (let ((cands '("1" "2")))
>                                 (lambda (string pred action)
>                                   (if (eq action 'metadata)
>                                       `(metadata
>                                         (annotation-function . ,(lambda (_) " ---")))
>                                     (complete-with-action
>                                      action cands string pred))))))))
>    table))

When trying to evaluate this, I get an error after hitting TAB at the prompt:

Debugger entered--Lisp error: (void-variable table)
  (functionp table)
  (if (functionp table) (progn (setq table (funcall (function (lambda
nil (let (...) (function ...))))))))
[...]




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#23852; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 27 Jun 2016 02:21:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 26 22:21:45 2016
Received: from localhost ([127.0.0.1]:57232 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1bHMBE-0004gM-SM
	for submit <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:21:45 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41981)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMBC-0004g7-Q3
 for submit <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:21:43 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMB6-0002GO-U3
 for submit <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:21:37 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:49054)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMB6-0002GK-Qw
 for submit <at> debbugs.gnu.org; Sun, 26 Jun 2016 22:21:36 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32947)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMB4-0000YA-Hz
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jun 2016 22:21:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMB0-0002Fs-W3
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jun 2016 22:21:34 -0400
Received: from mout.web.de ([212.227.15.14]:55550)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <michael_heerdegen@HIDDEN>) id 1bHMB0-0002Ff-M9
 for bug-gnu-emacs@HIDDEN; Sun, 26 Jun 2016 22:21:30 -0400
Received: from drachen.dragon ([79.216.83.88]) by smtp.web.de (mrweb001) with
 ESMTPSA (Nemesis) id 0MEmKo-1b6x6z1XJa-00G1hu for
 <bug-gnu-emacs@HIDDEN>; Mon, 27 Jun 2016 04:21:27 +0200
From: Michael Heerdegen <michael_heerdegen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.0.95; lazy-completion-table discards metadata
Date: Mon, 27 Jun 2016 04:21:24 +0200
Message-ID: <877fdbv0bf.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Provags-ID: V03:K0:4AYCerwcWFZwnBu9m3ctJ2tie6HGmL24vsqT6S/AldrYyOp5L+6
 fqF45KDiW0LlvuWkdFok92/POUiA2Skt/ubtzNIt6dOtwqSXhnkaJyUv1ohK1w7wiG3jpCh
 FHl7UUlw28VQv/vDn2dJoJ/OpK1DuT1OGsxQ9ABQc1JA9CSrHcttzIJqttvYBX3z0o0l2Ne
 0105hJwJ7YI+1dylXFqSw==
X-UI-Out-Filterresults: notjunk:1;V01:K0:1ol3dIOsz5E=:E6bXJwYKdgyGdBQN6WoF+r
 iLsiTgGgwuXIXKGhWX/JEjkt/9WfGGGiwb4oMfv1JvjvraOaEVyaysQEF3uJECzK+SzjTYABj
 avXyn6FF9qIIN9egYZfoFxEG7MN14ONR/hZ6cRDj5ea0zjUkHAoZphSYqRJWXvBU1m99IrRjG
 Vm04GFrR716dlY/mPqVBCIv559WqtCac5Ed94ne1kw6GAF8THj57uaev/vuHoqcW0wuj+cAAR
 0B7XXAgiHlqudDVu+3lOjVeju7xtBqjjJLO33Eu7qc/7NGu3HSjPRmI3MnCrk3Ew3tDsqhn5n
 Pbx4eYswdJuVhMcnwQ3Y1JbCqeibTON6ePWIrrOYB3yEhJTXwXD06IlJWv37xNmFRiIMfIrlf
 NGskg5M+Mrv41D9nDX3Go2Qt877XojrJVyRT7agnMn7emLfj8T6rt5czN7pynkajhso2p+twZ
 q8hsr+IPMpugoa8rF7PWkBZmZxK6F9hbubTHyzsTTQqb52oLkUrXNMwixw4srinAk7XOAY2NM
 uBzqJ4d7PdCxNJ8q9bAisrBWPhfD1jlMfwluh/sDp0RLcXkAqwygXfByN5OCzEghT1GeUH/TZ
 za2+BFpcOKEjp98/D6vrYwPQKYPr+a16SvZ+2r//VY9QRKW3w55+uheBB17IZu+onlVyhHGuY
 HRr/yrb8pxc56Q4aY2Vhoyy2z7sPFnOoxDoMd8NLbI6YSWUipAxTznOH3LJ09WSOZfbfARitR
 N617McAwYvJe1GyPz1m/q/vVuebaptTkIYBzPZQ1mT+WOEvypxVcPAOodJCpqxIYgpeRZHTnz
 curmlaG
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


Hello,

for example:

(completing-read
 "Input: "
 (letrec ((table (lazy-completion-table
                  table (lambda () (let ((cands '("1" "2")))
                                (lambda (string pred action)
                                  (if (eq action 'metadata)
                                      `(metadata
                                        (annotation-function . ,(lambda (_) " ---")))
                                    (complete-with-action
                                     action cands string pred))))))))
   table))


No annotations.

AFAICT this happens because lazy-completion-table is based on
completion-table-dynamic whose current implementation always returns
tables returning nil metadata.

There are workarounds, but it would be nicer if it just worked that
way...when the candidates are computed dynamically, an
annotation-function will ideally be computed along with them.


TIA,

Michael.



In GNU Emacs 25.0.95.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
 of 2016-06-21 built on drachen
Repository revision: 6cdd8f7153b553c6dc02be47e04a2e75117b6fe4
Windowing system distributor 'The X.Org Foundation', version 11.0.11803000
System Description:	Debian GNU/Linux testing (stretch)

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS NOTIFY
LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11





Acknowledgement sent to Michael Heerdegen <michael_heerdegen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#23852; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 27 Jun 2016 02:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.