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

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Mon, 27 Jun 2016 02:22:02 UTC

Severity: normal

Found in version 25.0.95

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.95; lazy-completion-table discards metadata
Date: Mon, 27 Jun 2016 04:21:24 +0200
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





This bug report was last modified 8 years and 354 days ago.

Previous Next


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