From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: 25839@debbugs.gnu.org
Subject: bug#25839: 26.0.50; Bug in gnus-registry-article-marks-to-chars
Date: Wed, 22 Feb 2017 09:23:16 -0800 [thread overview]
Message-ID: <87a89edtrv.fsf@ericabrahamsen.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Use-char-to-string-in-gnus-registry-article-marks-to.patch --]
[-- Type: text/x-diff, Size: 1555 bytes --]
From b05ff977a349688fc006fac399b0f29516f0ecef Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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
[-- Attachment #3: Type: text/plain, Size: 172 bytes --]
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
next reply other threads:[~2017-02-22 17:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 17:23 Eric Abrahamsen [this message]
2017-02-22 18:16 ` bug#25839: 26.0.50; Bug in gnus-registry-article-marks-to-chars Noam Postavsky
2017-02-22 18:34 ` Eric Abrahamsen
2017-02-22 18:53 ` Noam Postavsky
2017-02-23 3:18 ` npostavs
2017-03-01 3:01 ` npostavs
2017-03-14 19:25 ` Ted Zlatanov
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=87a89edtrv.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=25839@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.