Subject: bug#25839: 26.0.50; Bug in gnus-registry-article-marks-to-chars

From: Eric Abrahamsen <[email-masked]>
Date: Wed, 22 Feb 2017 09:23:16 -0800

The current implementation of gnus-registry-article-marks-to-chars
errors out because it tries to use mapconcat on a list of characters.
I've attached a patch that extracts the characters first and then uses
the mapconcat with char-to-string.

>From b05ff977a349688fc006fac399b0f29516f0ecef Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <[email-masked]>
Date: Wed, 22 Feb 2017 09:21:53 -0800
Subject: [PATCH] Use char-to-string in gnus-registry-article-marks-to-chars

* lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars):
  Otherwise it was running a list of characters through mapconcat,
  which produced an error.
---
 lisp/gnus/gnus-registry.el | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f728b19111..8229927176 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -967,13 +967,15 @@ 'gnus-registry-user-format-function-M
 (defun gnus-registry-article-marks-to-chars (headers)
   "Show the marks for an article by the :char property."
   (let* ((id (mail-header-message-id headers))
-         (marks (when id (gnus-registry-get-id-key id 'mark))))
-    (mapconcat (lambda (mark)
-                 (plist-get
-                  (cdr-safe
-                   (assoc mark gnus-registry-marks))
-                  :char))
-               marks "")))
+         (marks (when id (gnus-registry-get-id-key id 'mark)))
+	 (mark-chars
+	  (delq nil (mapcar (lambda (mark)
+			      (plist-get
+			       (cdr-safe
+				(assoc mark gnus-registry-marks))
+			       :char))
+			    marks))))
+    (mapconcat #'char-to-string mark-chars "")))
 
 ;; use like this:
 ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)
-- 
2.11.1

In GNU Emacs 26.0.50 (build 28, x86_64-unknown-linux-gnu, GTK+ Version 3.22.8)
 of 2017-02-19 built on clem
Repository revision: c8d14cfc6c2d19077d137c7e917fbb4f104de222