unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28688: 26.0.60; Making ucs-names hash tables breaks aa2u, counsel packages
@ 2017-10-03 15:40 Kaushal Modi
  2017-10-03 16:13 ` Kaushal Modi
  0 siblings, 1 reply; 8+ messages in thread
From: Kaushal Modi @ 2017-10-03 15:40 UTC (permalink / raw)
  To: mvoteiza, 28688

[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]

Hi Mark,

Can you please review the aa2u package in GNU Elpa?

https://elpa.gnu.org/packages/ascii-art-to-unicode.html

In there, there is this function which triggers error after this change[1]:

(defun aa2u-1c (stringifier &rest components)
  "Apply STRINGIFIER to COMPONENTS; return the UCS char w/ this name.
The char is a string (of length one), with two properties:

  aa2u-stringifier
  aa2u-components

Their values are STRINGIFIER and COMPONENTS, respectively."
  (let ((s (string (cdr (assoc-string (apply stringifier components)
                                      (ucs-names))))))
    (propertize s
                'aa2u-stringifier stringifier
                'aa2u-components components)))

Can you please update the package so that it works whether ucs-names is a
hash-table or a list?

I also realized that it broke the counsel-unicode-char interactive function
in the counsel.el package too:

(defun counsel-unicode-char (&optional count)
  "Insert COUNT copies of a Unicode character at point.
COUNT defaults to 1."
  (interactive "p")
  (let ((minibuffer-allow-text-properties t)
        (ivy-sort-max-size (expt 256 6)))
    (setq ivy-completion-beg (point))
    (setq ivy-completion-end (point))
    (ivy-read "Unicode name: "
              (nreverse
               (mapcar (lambda (x)
                         (propertize
                          (format "%06X % -60s%c" (cdr x) (car x) (cdr x))
                          'result (cdr x)))
                       (ucs-names)))
              :action (lambda (char)
                        (with-ivy-window
                          (delete-region ivy-completion-beg
ivy-completion-end)
                          (setq ivy-completion-beg (point))
                          (insert-char (get-text-property 0 'result char)
count)
                          (setq ivy-completion-end (point))))
              :history 'counsel-unicode-char-history
              :sort t)))

[1]:
http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=96c2c098aeed5c85733577ebbdaf33af6fbb59e9
-- 

Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 3250 bytes --]

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

end of thread, other threads:[~2017-10-04 10:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 15:40 bug#28688: 26.0.60; Making ucs-names hash tables breaks aa2u, counsel packages Kaushal Modi
2017-10-03 16:13 ` Kaushal Modi
2017-10-03 16:47   ` Kaushal Modi
2017-10-03 21:42     ` Kaushal Modi
2017-10-04  6:03       ` Thien-Thi Nguyen
2017-10-04  8:20         ` Eli Zaretskii
2017-10-04 10:11           ` Thien-Thi Nguyen
2017-10-03 19:42   ` Thien-Thi Nguyen

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).