From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: npostavs@users.sourceforge.net Newsgroups: gmane.emacs.bugs Subject: bug#25839: 26.0.50; Bug in gnus-registry-article-marks-to-chars Date: Wed, 22 Feb 2017 22:18:02 -0500 Message-ID: <87r32pfvdh.fsf@users.sourceforge.net> References: <87a89edtrv.fsf@ericabrahamsen.net> <8760k2dqhw.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1487820205 29430 195.159.176.226 (23 Feb 2017 03:23:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Feb 2017 03:23:25 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 25839@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 23 04:23:21 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgjzy-00078o-SP for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Feb 2017 04:23:19 +0100 Original-Received: from localhost ([::1]:56259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgk04-0001MZ-Qo for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Feb 2017 22:23:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cgjtx-00055Y-VA for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 22:17:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cgjtu-0007Xh-PK for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 22:17:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:53624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cgjtu-0007Xd-Kp for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 22:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cgjtu-0006XN-FB for bug-gnu-emacs@gnu.org; Wed, 22 Feb 2017 22:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Feb 2017 03:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25839 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25839-submit@debbugs.gnu.org id=B25839.148781981824897 (code B ref 25839); Thu, 23 Feb 2017 03:17:02 +0000 Original-Received: (at 25839) by debbugs.gnu.org; 23 Feb 2017 03:16:58 +0000 Original-Received: from localhost ([127.0.0.1]:51823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgjtq-0006TD-7t for submit@debbugs.gnu.org; Wed, 22 Feb 2017 22:16:58 -0500 Original-Received: from mail-it0-f44.google.com ([209.85.214.44]:35161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cgjto-0006Nu-2d; Wed, 22 Feb 2017 22:16:56 -0500 Original-Received: by mail-it0-f44.google.com with SMTP id 203so160668431ith.0; Wed, 22 Feb 2017 19:16:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XEz4GcUvhJH+Hg0G03Xt96ZULJzk6IHPVfCwhkH3RYc=; b=gcx4tyQUaNiJvsadoTia6mXpiRPoDHue4na4I6i2u2KJ032UA3/rTPwJ0c4NL6pQAc UvYJituxmTd1BD77mKliKiRtJ8FytLfhTaUHoZnxwpSZNr8ZojvhsVzmlKHSk7QyL3SY zBDNlGnOg1kfzMxzYuN1yd3jJwXc+2OKPyW9bJE0jyCrmFFLetEQnTyKyIpB+Nb0BcCp /dreujqQkNtqRTlKPHiG70BhWejUkixpZYVpS/zZ4DNAykCovX/snRErGvAcI11aRVEy EeD/J75Sn2PL4FXmAl4whQ0ZjEbZ2aMK4K8e5jYEC54vgGi9PEn7vFeUbO+zWgOKE5VX Xlkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=XEz4GcUvhJH+Hg0G03Xt96ZULJzk6IHPVfCwhkH3RYc=; b=MVYAevQhwhHiMLEg3z440ppyW9jz3VaAOY6zEv5tAKS0Kj6sfICf17deglohNsvFXc c9Zz/bM5UKULacwWyFtewflYy1Ke24FZJF+NgDXglyCJmHNJo6GHKjiYNocKho0Apfdd 5957kf5s+6M1xNULxdiBxXx/BQnCJbM9HqrB7YK+yUPIyIRG9tM4juEYUHIug+rWqIph 7xa//esvofP0v9n7t6c+uY8//Z8Yskqu3EbgTkKIbo6ZktK1bT2jIOaJkvVHvAt62xHz D2KTfLNlxdQlf8RlYpx1a5O1pk2nhKN3U1Tm43YP7PspXR4SdnbXbuIPCNg5nzRFKBn+ An9g== X-Gm-Message-State: AMke39m/EBgJJW7XXxMLIVTaFBBxfGZdGydD4Elyv8KznxMJa5aESapioigZE7QDGV0Sqw== X-Received: by 10.107.164.147 with SMTP id d19mr28201991ioj.79.1487819810541; Wed, 22 Feb 2017 19:16:50 -0800 (PST) Original-Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id p68sm466679iop.8.2017.02.22.19.16.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Feb 2017 19:16:49 -0800 (PST) In-Reply-To: (Noam Postavsky's message of "Wed, 22 Feb 2017 13:53:29 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129679 Archived-At: --=-=-= Content-Type: text/plain tags 25839 patch quit Forwarding message to list. --=-=-= Content-Type: message/rfc822 Content-Disposition: inline Delivered-To: npostavs@gmail.com Received: by 10.157.11.3 with SMTP id a3csp1076906ota; Wed, 22 Feb 2017 17:28:32 -0800 (PST) X-Received: by 10.107.181.10 with SMTP id e10mr26625223iof.156.1487813312818; Wed, 22 Feb 2017 17:28:32 -0800 (PST) Return-Path: Received: from mx.sourceforge.net (mx.sourceforge.net. [216.34.181.68]) by mx.google.com with ESMTPS id h202si3283047ita.24.2017.02.22.17.28.32 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 22 Feb 2017 17:28:32 -0800 (PST) Received-SPF: fail (google.com: domain of eric@ericabrahamsen.net does not designate 216.34.181.68 as permitted sender) client-ip=216.34.181.68; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@sourceforge.net; dkim=pass (test mode) header.i=@sf.net; dkim=pass header.i=@mail.ericabrahamsen.net; spf=fail (google.com: domain of eric@ericabrahamsen.net does not designate 216.34.181.68 as permitted sender) smtp.mailfrom=eric@ericabrahamsen.net; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ericabrahamsen.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:To:From; bh=5brBZHUhoa5MHnPCcgTS9vishR81SfEzVFtu1g9zChY=; b=k0jsDxqEPpTDwp7ZRZ0PRZxieCZNH+qpsV6bNihRPn4HR2XklAJvYTP7jO2QstsRarNY22xxlTVYZVgRLisbGWipMTAc0LC3Wlbmv1FORvupFJpiGgR1KfbTVmbAriNn6ksBB9vc0Q1OPYQhAcUKktmxcQWPrF4rYi137xY0iVI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:To:From; bh=5brBZHUhoa5MHnPCcgTS9vishR81SfEzVFtu1g9zChY=; b=ZWxGXa+O18gVgsUt5vx20hSqUVz/iOKNwvupjznMtcqJD05v2jitxbon5ma12lxc1A9Wt2AXjfE0RhK+OqTuFvgIxTptvQlVTTdWJ3PRU1IhJF7A/U8070JMc///4rR4vasUR3NoT0lLcTCw2C0iQyhxrtHgM6zomJSeMfPuoWk=; Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of ericabrahamsen.net designates 50.56.99.223 as permitted sender) client-ip=50.56.99.223; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net; Received: from mail.ericabrahamsen.net ([50.56.99.223]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1cgiCs-00005q-5f for npostavs@users.sourceforge.net; Thu, 23 Feb 2017 01:28:32 +0000 Received: from localhost (unknown [162.208.42.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D4573BE5F7 for ; Thu, 23 Feb 2017 01:28:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mail.ericabrahamsen.net; s=mail; t=1487813305; bh=5brBZHUhoa5MHnPCcgTS9vishR81SfEzVFtu1g9zChY=; h=From:To:Subject:References:Date:In-Reply-To:From; b=NyyPBVVzVxZMqOQLbIW4tjHm+WlmzogGeflxrKCcXtVUIB5+f3dbaqr8P9j9SIqAP sNKuna0O54xgro5H8iJgMbhvVLM/tCG1aV81uehsiUOmq+RrF7qzPj0w+hIL54DaoQ WcdDqJ+yRv0+X8MZHWDrvJYLRpOdOdj0kHwcU4E8= From: Eric Abrahamsen To: Noam Postavsky Subject: Re: bug#25839: 26.0.50; Bug in gnus-registry-article-marks-to-chars References: <87a89edtrv.fsf@ericabrahamsen.net> <8760k2dqhw.fsf@ericabrahamsen.net> Date: Wed, 22 Feb 2017 17:28:24 -0800 In-Reply-To: (Noam Postavsky's message of "Wed, 22 Feb 2017 13:53:29 -0500") Message-ID: <87fuj5vgp3.fsf@pellet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1cgiCs-00005q-5f MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="====-=-=" --====-=-= Content-Type: text/plain Content-Disposition: inline On 02/22/17 13:53 PM, Noam Postavsky wrote: > On Wed, Feb 22, 2017 at 1:34 PM, Eric Abrahamsen > wrote: >> >> On 02/22/17 13:16 PM, Noam Postavsky wrote: >>> On Wed, Feb 22, 2017 at 12:23 PM, Eric Abrahamsen >>> wrote: >>>> >>>> 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. >>>> >>> >>>> + (mapconcat #'char-to-string mark-chars ""))) >>> >>> AFAIK, this should be the same as (apply #'string mark-chars). >> >> Good point! Let me stare at this a bit longer, and post another patch. >> > > Or actually even simpler: (concat mark-chars) Very nice! Here's another one. --====-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Don-t-use-mapconcat-with-chars-in-gnus-registry-mark.patch >From 2f2c368ba872478476cee1d1b6e121480ec64cfc Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Wed, 22 Feb 2017 17:26:11 -0800 Subject: [PATCH] Don't use mapconcat with chars in gnus registry marks * lisp/gnus/gnus-registry.el (gnus-registry-article-marks-to-chars): Instead, use a plain concat, which will create a string out of a list of chars. --- lisp/gnus/gnus-registry.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el index f728b19111..51f6459d2f 100644 --- a/lisp/gnus/gnus-registry.el +++ b/lisp/gnus/gnus-registry.el @@ -968,12 +968,13 @@ gnus-registry-article-marks-to-chars "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 ""))) + (concat (delq nil + (mapcar + (lambda (m) + (plist-get + (cdr-safe (assoc m gnus-registry-marks)) + :char)) + marks))))) ;; use like this: ;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names) -- 2.11.1 --====-=-=-- --=-=-=--