GNU bug report logs - #10502
24.0.92; Please add optional NAMES arg to `read-char-by-name'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sat, 14 Jan 2012 15:10:02 UTC

Severity: wishlist

Tags: wontfix

Found in version 24.0.92

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 10502 <at> debbugs.gnu.org
Subject: bug#10502: 24.0.92; Please add optional NAMES arg to `read-char-by-name'
Date: Thu, 28 Apr 2016 07:20:07 -0700 (PDT)
> > The use of `(ucs-names)' is hard-coded in `read-char-by-name'.  Please
> > add an optional parameter NAMES that defaults to `(ucs-names)' and use
> > that instead.  That will enable callers to use a different set of
> > candidates, typically a subset of `(ucs-names)'.
> 
> I don't think so.  `read-char-by-name' is just a shim over
> 
> (completing-read
>  prompt
>  (lambda (string pred action)
>    (if (eq action 'metadata)
>        '(metadata
>          (annotation-function . mule--ucs-names-annotation)
>          (category . unicode-name))
>      (complete-with-action action (ucs-names) string pred))))
> 
> and if you want a different completion table, then you should just avoid
> `read-char-by-name' -- it doesn't provide much value.

No.  `read-char-by-name' is useful generally.  It is a general
function for reading a character by its Unicode name.  Nothing
about that means that the full set of Unicode names need
necessarily be the set to choose from.  The function becomes
far more useful if a caller can specify the set of chars to
use as the domain.




This bug report was last modified 9 years and 82 days ago.

Previous Next


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