unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23852: 25.0.95; lazy-completion-table discards metadata
@ 2016-06-27  2:21 Michael Heerdegen
  2016-06-27  2:42 ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2016-06-27  2:21 UTC (permalink / raw)
  To: 23852


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






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-27  2:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27  2:21 bug#23852: 25.0.95; lazy-completion-table discards metadata Michael Heerdegen
2016-06-27  2:42 ` Noam Postavsky
2016-06-27  2:47   ` Michael Heerdegen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).