From: Jambunathan K <kjambunathan@gmail.com>
To: 13206@debbugs.gnu.org
Subject: bug#13206: 24.3.50; FR: insert-char must(?) show characters visually in completion buffer
Date: Mon, 17 Dec 2012 19:10:34 +0530 [thread overview]
Message-ID: <87licwiyp9.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 996 bytes --]
(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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: minibuffer-hack.diff --]
[-- Type: text/x-diff, Size: 536 bytes --]
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el 2012-11-29 21:32:24 +0000
+++ lisp/minibuffer.el 2012-12-17 13:20:32 +0000
@@ -1690,7 +1690,9 @@ variables.")
(setq completions
(mapcar (lambda (s)
(let ((ann (funcall afun s)))
- (if ann (list s ann) s)))
+ ;; (if ann (list s ann) s)
+ ann
+ ))
completions)))
(with-current-buffer standard-output
[-- Attachment #3: 1-insert-char-with-annotations.png --]
[-- Type: image/png, Size: 25765 bytes --]
[-- Attachment #4: 2-insert-char-with-substitution.png --]
[-- Type: image/png, Size: 20000 bytes --]
[-- Attachment #5: Type: text/plain, Size: 372 bytes --]
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@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
next reply other threads:[~2012-12-17 13:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 13:40 Jambunathan K [this message]
2012-12-17 14:34 ` bug#13206: 24.3.50; FR: insert-char must(?) show characters visually in completion buffer Stefan Monnier
2012-12-17 14:45 ` Drew Adams
2013-11-15 4:44 ` Jambunathan K
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87licwiyp9.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=13206@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.