From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87383 Path: news.gmane.org!.POSTED!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: registry and the gnus-summary-line-format Date: Tue, 21 Feb 2017 10:32:33 -0800 Message-ID: <87o9xvs8ce.fsf@ericabrahamsen.net> References: <87wpcl3lee.fsf@mat.ucm.es> <87fuj96589.fsf@ericabrahamsen.net> <87y3wzhhwi.fsf@mat.ucm.es> <878toztso2.fsf@ericabrahamsen.net> <87wpcjflnr.fsf@mat.ucm.es> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487702003 9770 195.159.176.226 (21 Feb 2017 18:33:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2017 18:33:23 +0000 (UTC) User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/26.0 (gnu/linux) To: ding@gnus.org Original-X-From: ding-owner+m35604@lists.math.uh.edu Tue Feb 21 19:33:17 2017 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048035.atla03.us.yomura.com ([107.189.48.35]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgFFU-00027K-J2 for ding-account@gmane.org; Tue, 21 Feb 2017 19:33:16 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048035.atla03.us.yomura.com (Halon) with ESMTPS id 2c587d2d-f864-11e6-b156-b499baabecb2; Tue, 21 Feb 2017 18:33:00 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.87) (envelope-from ) id 1cgFF1-0006WE-8x; Tue, 21 Feb 2017 12:32:47 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cgFF0-0006Vh-3b for ding@lists.math.uh.edu; Tue, 21 Feb 2017 12:32:46 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1cgFEz-0003sl-4r for ding@lists.math.uh.edu; Tue, 21 Feb 2017 12:32:46 -0600 Original-Received: from [195.159.176.226] (helo=blaine.gmane.org) by quimby.gnus.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1cgFEx-0005Ir-O8 for ding@gnus.org; Tue, 21 Feb 2017 19:32:43 +0100 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cgFEp-0007Fr-3V for ding@gnus.org; Tue, 21 Feb 2017 19:32:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:3OHzaecaDl6g59Z0Xo9v/dhriX8= List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87383 Archived-At: Uwe Brauer writes: > > Uwe Brauer writes: > > > [...] > > > > The error is in: > > > #+BEGIN_SRC elisp > > (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 ""))) > > #+END_SRC > > > > I tried out > > (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 > (list > (cdr-safe > (assoc mark gnus-registry-marks))) > :char)) > marks ""))) The `list' was supposed to go outside the plist-get. Here's a version that uses `char-to-string', which I think is more explicit: (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) (char-to-string (plist-get (cdr-safe (assoc mark gnus-registry-marks)) :char))) marks "")))