From: Kaushal Modi <kaushal.modi@gmail.com>
To: 28688@debbugs.gnu.org
Cc: Mark Oteiza <mvoteiza@udel.edu>, "ttn@gnu.org" <ttn@gnu.org>,
Oleh Krehel <oleh@oremacs.com>
Subject: bug#28688: 26.0.60; Making ucs-names hash tables breaks aa2u, counsel packages
Date: Tue, 03 Oct 2017 16:13:26 +0000 [thread overview]
Message-ID: <CAFyQvY380r89N=2wba=_ab7N7C3vQTuE2wtts0UBH-NGvHmcjg@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3Oqa1MdxsACeEgpKP9kQyts68XudLm28h6P8WgqnBr-w@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 438 bytes --]
Here is my patch for fixing the aa2u package (attached). I have copied
Thien-Thi Nguyen, aa2u's maintainer to verify it. Please commit it if all
looks good; I don't have commit rights, but have my FSF copyright
assignment on file.
Also copying Oleh as I couldn't figure out how to fix counsel-unicode-char.
ivy-read accepts a COLLECTION which is a list.. so now we need to convert
the hash table back to list for that?
--
Kaushal Modi
[-- Attachment #1.2: Type: text/html, Size: 605 bytes --]
[-- Attachment #2: 0001-Adapt-to-ucs-names-now-being-a-hash-table.patch --]
[-- Type: application/octet-stream, Size: 1785 bytes --]
From d861357312804be8749044ea22707f37cc88e39e Mon Sep 17 00:00:00 2001
From: Kaushal Modi <kaushal.modi@gmail.com>
Date: Tue, 3 Oct 2017 12:04:21 -0400
Subject: [PATCH] Adapt to ucs-names now being a hash table
* packages/ascii-art-to-unicode/ascii-art-to-unicode.el (aa2u-1c): Use gethash
if ucs-names returns a hash table. Make the package function in emacs 26.1
as well as older versions.
(http://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-26&id=96c2c098aeed5c85733577ebbdaf33af6fbb59e9)
---
packages/ascii-art-to-unicode/ascii-art-to-unicode.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/packages/ascii-art-to-unicode/ascii-art-to-unicode.el b/packages/ascii-art-to-unicode/ascii-art-to-unicode.el
index 92236628b..f7458aed8 100644
--- a/packages/ascii-art-to-unicode/ascii-art-to-unicode.el
+++ b/packages/ascii-art-to-unicode/ascii-art-to-unicode.el
@@ -4,7 +4,7 @@
;; Author: Thien-Thi Nguyen <ttn@gnu.org>
;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
-;; Version: 1.9
+;; Version: 2.0
;; Keywords: ascii, unicode, box-drawing
;; URL: http://www.gnuvola.org/software/aa2u/
@@ -145,8 +145,11 @@ The char is a string (of length one), with two properties:
aa2u-components
Their values are STRINGIFIER and COMPONENTS, respectively."
- (let ((s (string (cdr (assoc-string (apply stringifier components)
- (ucs-names))))))
+ (let* ((ucs-map (ucs-names))
+ (key (apply stringifier components))
+ (s (string (if (hash-table-p ucs-map)
+ (gethash key ucs-map)
+ (cdr (assoc-string key ucs-map))))))
(propertize s
'aa2u-stringifier stringifier
'aa2u-components components)))
--
2.14.1
next prev parent reply other threads:[~2017-10-03 16:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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='CAFyQvY380r89N=2wba=_ab7N7C3vQTuE2wtts0UBH-NGvHmcjg@mail.gmail.com' \
--to=kaushal.modi@gmail.com \
--cc=28688@debbugs.gnu.org \
--cc=mvoteiza@udel.edu \
--cc=oleh@oremacs.com \
--cc=ttn@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.