GNU bug report logs - #12690
24.2; [FEATURE REQUEST] Make :annotation-function more flexible

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sat, 20 Oct 2012 08:29:01 UTC

Severity: wishlist

Found in version 24.2

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 12690 <at> debbugs.gnu.org
Subject: bug#12690: 24.2; [FEATURE REQUEST] Make :annotation-function more flexible
Date: Mon, 22 Oct 2012 21:51:27 -0400
severity 12690 wishlist
thanks

> In a modern decent IDE, completion annotation is a great help in finding
> the right completion candidate especially when the collection is large.
> See the attached screenshot, it uses color and letter to help users
> identify the type of completion they are looking for. Emacs is rather
> limited in this regard. It seems something can be achieved by allowing
> :annotation-function to return the WHOLE thing to be displayed in the
> *Completions* buffer.

I agree we need to make it possible to provide a richer display.
E.g. popup-help on each entry, or even more extended help in *Help* by
pressing a particular key.
In your image you show text prepended before each entry as well, which
can be also be useful.  But note that prepending text requires accessing
the complete completion list, so as to know how much space to leave to
align all entries.
Furthermore, how to display such text might depend on the UI you use
(e.g. you can prepend the text without affecting the actual textual
content of the completion buffer with an overlay or text-properties,
but that won't work if the completion is displayed as a GUI menu, so
I think we'd need the new annotation function to return a "high-level"
description so the UI code can then choose which trick to use to display
that data).


        Stefan




This bug report was last modified 12 years and 236 days ago.

Previous Next


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