GNU bug report logs - #13206
24.3.50; FR: insert-char must(?) show characters visually in completion buffer

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Mon, 17 Dec 2012 13:40:03 UTC

Severity: wishlist

Found in version 24.3.50

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13206 in the body.
You can then email your comments to 13206 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13206; Package emacs. (Mon, 17 Dec 2012 13:40:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jambunathan K <kjambunathan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 17 Dec 2012 13:40:04 GMT) Full text and rfc822 format available.

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

From: Jambunathan K <kjambunathan <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50;
	FR: insert-char must(?) show characters visually in completion buffer
Date: Mon, 17 Dec 2012 19:10:34 +0530
[Message part 1 (text/plain, inline)]
(My NIC card went down during earlier sent.  Apologies if it results in
duplicate bug)

It will be wonderful if ucs-insert shows the characters visually in the
completion buffer.

Here is a proof-of-concept.  Install an annotation function. 

    (setq completion-extra-properties
          (list :annotation-function 'annotate-ucs-names))

    (defun annotate-ucs-names (name)
      (format "(%s)" (char-to-string (cdr (assoc-string name (ucs-names) t)))))

M-x insert-char RET will give screenshot 1.  Note the presence of
characters visually next to char names.  I would have wised to place the
the glyphs come before the description.

Now let us install a small /hack/ to minibuffer as shown below. The
result is as shown in screenshot 2, which I would much prefer.
(Ofcourse, the insertion itself wouldn't work)

Following two things emerge from this experiment.

    1. Annotation may go infront of the candidate.
    2. Annotation may provide a substitution for visual feedback etc etc.

[minibuffer-hack.diff (text/x-diff, attachment)]
[1-insert-char-with-annotations.png (image/png, attachment)]
[2-insert-char-with-substitution.png (image/png, attachment)]
[Message part 5 (text/plain, inline)]

In GNU Emacs 24.3.50.5 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-12-15 on debian-6.05
Bzr revision: 111244 eliz <at> gnu.org-20121215133821-ie5ujd9ogv3tw34f
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13206; Package emacs. (Mon, 17 Dec 2012 14:43:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 13206 <at> debbugs.gnu.org
Subject: Re: bug#13206: 24.3.50;
	FR: insert-char must(?) show characters visually in completion buffer
Date: Mon, 17 Dec 2012 09:34:26 -0500
> It will be wonderful if ucs-insert shows the characters visually in the
> completion buffer.

> Here is a proof-of-concept.  Install an annotation function. 

>     (setq completion-extra-properties
>           (list :annotation-function 'annotate-ucs-names))

>     (defun annotate-ucs-names (name)
>       (format "(%s)" (char-to-string (cdr (assoc-string name (ucs-names) t)))))

I'd be happy to install such a patch, yes.  Please send it along.

> M-x insert-char RET will give screenshot 1.  Note the presence of
> characters visually next to char names.  I would have wised to place the
> the glyphs come before the description.

Indeed, placing them before would make sense.

> Now let us install a small /hack/ to minibuffer as shown below. The
> result is as shown in screenshot 2, which I would much prefer.
> (Ofcourse, the insertion itself wouldn't work)

Indeed, this version has various problems.  E.g. as a user, I'd often
have trouble figuring out which chars goes with which name.

I agree that the annotation mechanism would deserve improvement.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13206; Package emacs. (Mon, 17 Dec 2012 14:48:02 GMT) Full text and rfc822 format available.

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

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Jambunathan K'" <kjambunathan <at> gmail.com>, <13206 <at> debbugs.gnu.org>
Subject: RE: bug#13206: 24.3.50;
	FR: insert-char must(?) show characters visually in completion buffer
Date: Mon, 17 Dec 2012 06:45:54 -0800
[Message part 1 (text/plain, inline)]
> It will be wonderful if ucs-insert shows the characters 
> visually in the completion buffer.

FWIW, Icicles has had that feature for quite a while.

The attached screenshot shows also what happens when cycling:
*Completions* mode line shows the char with its code point.

,----
| icicle-read-char-by-name is a compiled Lisp function.
| 
| (icicle-read-char-by-name PROMPT &optional NAMES)
| 
| Read a character by its Unicode name or hex number string.
| Display PROMPT and read a string that represents a character by its
| Unicode property `name' or `old-name'.  Return the char as a number.
| 
| You can use completion against the Unicode name of the character.
| 
| In Icicle mode:
| 
| * The character itself is displayed next to its name, even though it
|   is not part of the completion candidate.  WYSIWYG.
| 
| * When you cycle among candidates, the current character and its
|   Unicode code point are shown in the mode line (provided user option
|   `icicle-help-in-mode-line-delay' is greater than zero.)
| 
| If you use a dedicated `*Completions*' frame, then the font used in
| `*Completions*' is the same as the frame from which you invoked
| completion.
| 
| If you use library `doremi-frm.el' then you can increase the font size
| for `*Completions*' dynamically using `C-x -'.
| 
| As an alternative to completing the Unicode name, you can input a
| number for the Unicode code point: a hexidecimal number or a number in
| hash notation: #o21430 for octal, #x2318 for hex, or #10r8984 for
| decimal.
| 
| Non-nil optional arg NAMES is an alist of names to use in place of the
| value returned by `icicle-ucs-names'.  It must have the same form as
| such a return value: (CHAR-NAME . CHAR-CODE).
`----
[throw-icy-unicode-comp.png (image/png, attachment)]

Reply sent to Jambunathan K <kjambunathan <at> gmail.com>:
You have taken responsibility. (Fri, 15 Nov 2013 04:45:05 GMT) Full text and rfc822 format available.

Notification sent to Jambunathan K <kjambunathan <at> gmail.com>:
bug acknowledged by developer. (Fri, 15 Nov 2013 04:45:06 GMT) Full text and rfc822 format available.

Message #16 received at 13206-done <at> debbugs.gnu.org (full text, mbox):

From: Jambunathan K <kjambunathan <at> gmail.com>
To: 13206-done <at> debbugs.gnu.org
Subject: Re: bug#13206: 24.3.50;
 FR: insert-char must(?) show characters visually in completion buffer
Date: Fri, 15 Nov 2013 10:14:29 +0530
OP here.  Closed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 13 Dec 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 194 days ago.

Previous Next


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