From unknown Fri Aug 15 20:27:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect Resent-From: Xu Chunyang Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2019 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 36418@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156172822810414 (code B ref -1); Fri, 28 Jun 2019 13:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2019 13:23:48 +0000 Received: from localhost ([127.0.0.1]:40564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgqqy-0002hu-AK for submit@debbugs.gnu.org; Fri, 28 Jun 2019 09:23:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:34635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgqqw-0002hm-5M for submit@debbugs.gnu.org; Fri, 28 Jun 2019 09:23:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53149) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgqqu-0000mV-4u for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgqqr-0002Ey-HV for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:43 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45747) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgqqp-00021R-23 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:39 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9D93121A7B for ; Fri, 28 Jun 2019 09:23:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 28 Jun 2019 09:23:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xuchunyang.me; h=from:to:subject:date:message-id:mime-version:content-type; s= fm2; bh=Ja4eFGk5aYBwc571mPX53KfAiYiA/bWYIQlZ166/Gpc=; b=CicYNXPb X92nziOYWk2+h9I5KQRNwc8xlo2oLKnylIBqfxIc8BLn2IqUCgXNlJl0KvSUxspC vwGR67CBfiPgv/5av+l0lu1K/w5oBUeV5UqIlGeQilmU9TwUGdyy6Rs3maGsNz3B tgIzMR5zDSMqeY0My/OtvGCepoY4DjuWSGpvrBa7zWfhlONMSfAfDx43k6GMB/yA joBuo4zxTLAwK2FSe0iFpuI6WM0zfIK/x0kuma7/sKebwaAmh4KG/HNS8ExmYJbr zlSoWR0jevzb+bMmwQm+iwnHlU776u6bBU7fofdJ7Poxh5oAfP49Sw5/15vP968p +A5ao94EzqvUKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=Ja4eFGk5aYBwc571mPX53KfAiYiA/ bWYIQlZ166/Gpc=; b=idClAZdgd/EpcSlJG0veRT5ZoQrSP3TAl7X/046Og7e/5 ZBbi2nJvTk+06ZPl0CWNQW41Qi+Zwlm3RDEyCJiauIwPpKV6tbXTM9/Q0euxDCWw +TBSM1pXnJRtshEodrFt0bRNES2tXf0/Nz2jhgkkDZsrdk1NF9NwHqhboe3KWVti pwtCjk9Xw8OOthJ1soTVHTwiMxJyFcRqm5kiNvPvv6ZivwKKHdEuXffnHjVshhVW I+L5nlABpPSQYnFPmHdYBrEqgjCfT5SGF0QHYVG+2RthpcwzIrOU73EfTwem99mq dV37KJ0/xx3P7cIywaIuF+eUqAy3ZxsG9Fx11SZ0Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddtgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufgffffkgggtsehttdertddtre dtnecuhfhrohhmpegiuhcuvehhuhhnhigrnhhguceomhgrihhlseiguhgthhhunhihrghn ghdrmhgvqeenucfkphepuddujedrleefrddvtdeirddufeefnecurfgrrhgrmhepmhgrih hlfhhrohhmpehmrghilhesgihutghhuhhnhigrnhhgrdhmvgenucevlhhushhtvghrufhi iigvpedt X-ME-Proxy: Received: from Chunyangs-MacBook-Air.local (unknown [117.93.206.133]) by mail.messagingengine.com (Postfix) with ESMTPA id 4EF158005A for ; Fri, 28 Jun 2019 09:23:27 -0400 (EDT) From: Xu Chunyang User-Agent: Emacs/26.2.90 Date: Fri, 28 Jun 2019 21:23:24 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) C-h f mapconcat says > SEPARATOR must be a string. but nil works fine (mapconcat #'identity '("a" "b") nil) ;; => "ab" and `string-join` relies on this fact (by the way, string-join's docstring doesn't explain the case when separator is omitted or nil) (defsubst string-join (strings &optional separator) "Join all STRINGS using SEPARATOR." (mapconcat 'identity strings separator)) C-h S mapconcat says > SEPARATOR, which also must be a string, or a vector or list of > characters. C-h f concat says > Each argument may be a string or a list or vector of characters (integers). From unknown Fri Aug 15 20:27:55 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect References: In-Reply-To: Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Jul 2019 04:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36418 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Xu Chunyang Cc: 36418@debbugs.gnu.org Received: via spool by 36418-submit@debbugs.gnu.org id=B36418.156238664912676 (code B ref 36418); Sat, 06 Jul 2019 04:18:02 +0000 Received: (at 36418) by debbugs.gnu.org; 6 Jul 2019 04:17:29 +0000 Received: from localhost ([127.0.0.1]:54095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjc8e-0003IO-Mj for submit@debbugs.gnu.org; Sat, 06 Jul 2019 00:17:28 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:54251) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjc8b-0003IA-Up for 36418@debbugs.gnu.org; Sat, 06 Jul 2019 00:17:26 -0400 Received: by mail-wm1-f44.google.com with SMTP id x15so10865550wmj.3 for <36418@debbugs.gnu.org>; Fri, 05 Jul 2019 21:17:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=eDHotNxxGDseFO+aN5Xk7J8A+kQMGJ4iCSocgDn/ADo=; b=sYq1dEY5SXzuHnciFopK/DT07+R6eJzq28RV6zFwdBuJg7+a65ak0COia//V5NxWKS 0lYuqlr4OcZfpcfcImkgOPX2GMTGWOAq3Dzai0CX+V1T9guJgco/q+pbRvrBKdSgYjee GwnlpEKQ4oGrSRMaf+OoKSDg6GZawlrkVh6zcE8wfRIgV5IJ3iaVHSSEgGlZi/4ywXKS ZPZHgeGMQR2eH2J1Bltz7e5VQSIJogZfQkg1B3MM7IpufwVj39VafQkskPZ69UZS7hDY k+0U+n1cXgK9JNemkMUM0lDm5mSGSCxIN4B29al+NuJZxEBvFRQJyNwimNLeldSefL8N CTrQ== X-Gm-Message-State: APjAAAXGDEznD5XhjYU3ifBLormo9JyEDG4TI6HAZ4fkgHIlhA2DVrnp Ud0h3w9aTu/3vhaWr2BKvMLQXqbfsJ0NVJUYZYm/vzLe X-Google-Smtp-Source: APXvYqwBgv0kaUWwOPStHucuw57WQObmkipgSIm60/iyJwV8AqiSKrVyqJs1fLyuC6I5VNDDMKkk4NFwUPZVwbCyFUc= X-Received: by 2002:a7b:c04f:: with SMTP id u15mr5801333wmc.106.1562386640025; Fri, 05 Jul 2019 21:17:20 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sat, 6 Jul 2019 06:17:08 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Xu Chunyang writes: > C-h f mapconcat says > >> SEPARATOR must be a string. > > but nil works fine > > (mapconcat #'identity '("a" "b") nil) > ;; => "ab" This seems to have been added in commit aecbbd57, which fixes Bug#35710: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35710 Perhaps Eli would want to weigh in on this? > and `string-join` relies on this fact (by the way, string-join's > docstring doesn't explain the case when separator is omitted or nil) > > (defsubst string-join (strings &optional separator) > "Join all STRINGS using SEPARATOR." > (mapconcat 'identity strings separator)) This could be expanded, in my opinion. > C-h S mapconcat says > >> SEPARATOR, which also must be a string, or a vector or list of >> characters. > > C-h f concat says > >> Each argument may be a string or a list or vector of characters (integers). In other words, since SEPARATOR can be a "list of characters", it follows that it can also be nil (which is equivalent to the empty list). Thanks, Stefan Kangas From unknown Fri Aug 15 20:27:55 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Xu Chunyang Subject: bug#36418: closed (Re: bug#36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect) Message-ID: References: <835zofaa8s.fsf@gnu.org> X-Gnu-PR-Message: they-closed 36418 X-Gnu-PR-Package: emacs Reply-To: 36418@debbugs.gnu.org Date: Sat, 06 Jul 2019 07:34:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1562398442-8302-1" This is a multi-part message in MIME format... ------------=_1562398442-8302-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 36418@debbugs.gnu.org. --=20 36418: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36418 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1562398442-8302-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 36418-done) by debbugs.gnu.org; 6 Jul 2019 07:33:06 +0000 Received: from localhost ([127.0.0.1]:54147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjfBy-00028J-4R for submit@debbugs.gnu.org; Sat, 06 Jul 2019 03:33:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44472) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hjfBv-00027j-B0 for 36418-done@debbugs.gnu.org; Sat, 06 Jul 2019 03:33:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hjfBp-0001oY-Rl; Sat, 06 Jul 2019 03:32:57 -0400 Received: from [176.228.60.248] (port=3295 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hjfBp-0008EM-CI; Sat, 06 Jul 2019 03:32:57 -0400 Date: Sat, 06 Jul 2019 10:32:51 +0300 Message-Id: <835zofaa8s.fsf@gnu.org> From: Eli Zaretskii To: Stefan Kangas In-reply-to: (message from Stefan Kangas on Sat, 6 Jul 2019 06:17:08 +0200) Subject: Re: bug#36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36418-done Cc: 36418-done@debbugs.gnu.org, mail@xuchunyang.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Stefan Kangas > Date: Sat, 6 Jul 2019 06:17:08 +0200 > Cc: 36418@debbugs.gnu.org > > > C-h S mapconcat says > > > >> SEPARATOR, which also must be a string, or a vector or list of > >> characters. > > > > C-h f concat says > > > >> Each argument may be a string or a list or vector of characters (integers). > > In other words, since SEPARATOR can be a "list of characters", it > follows that it can also be nil (which is equivalent to the empty list). Right, I fixed the doc string. ------------=_1562398442-8302-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 28 Jun 2019 13:23:48 +0000 Received: from localhost ([127.0.0.1]:40564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgqqy-0002hu-AK for submit@debbugs.gnu.org; Fri, 28 Jun 2019 09:23:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:34635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgqqw-0002hm-5M for submit@debbugs.gnu.org; Fri, 28 Jun 2019 09:23:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53149) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgqqu-0000mV-4u for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgqqr-0002Ey-HV for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:43 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45747) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hgqqp-00021R-23 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2019 09:23:39 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9D93121A7B for ; Fri, 28 Jun 2019 09:23:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 28 Jun 2019 09:23:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xuchunyang.me; h=from:to:subject:date:message-id:mime-version:content-type; s= fm2; bh=Ja4eFGk5aYBwc571mPX53KfAiYiA/bWYIQlZ166/Gpc=; b=CicYNXPb X92nziOYWk2+h9I5KQRNwc8xlo2oLKnylIBqfxIc8BLn2IqUCgXNlJl0KvSUxspC vwGR67CBfiPgv/5av+l0lu1K/w5oBUeV5UqIlGeQilmU9TwUGdyy6Rs3maGsNz3B tgIzMR5zDSMqeY0My/OtvGCepoY4DjuWSGpvrBa7zWfhlONMSfAfDx43k6GMB/yA joBuo4zxTLAwK2FSe0iFpuI6WM0zfIK/x0kuma7/sKebwaAmh4KG/HNS8ExmYJbr zlSoWR0jevzb+bMmwQm+iwnHlU776u6bBU7fofdJ7Poxh5oAfP49Sw5/15vP968p +A5ao94EzqvUKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=Ja4eFGk5aYBwc571mPX53KfAiYiA/ bWYIQlZ166/Gpc=; b=idClAZdgd/EpcSlJG0veRT5ZoQrSP3TAl7X/046Og7e/5 ZBbi2nJvTk+06ZPl0CWNQW41Qi+Zwlm3RDEyCJiauIwPpKV6tbXTM9/Q0euxDCWw +TBSM1pXnJRtshEodrFt0bRNES2tXf0/Nz2jhgkkDZsrdk1NF9NwHqhboe3KWVti pwtCjk9Xw8OOthJ1soTVHTwiMxJyFcRqm5kiNvPvv6ZivwKKHdEuXffnHjVshhVW I+L5nlABpPSQYnFPmHdYBrEqgjCfT5SGF0QHYVG+2RthpcwzIrOU73EfTwem99mq dV37KJ0/xx3P7cIywaIuF+eUqAy3ZxsG9Fx11SZ0Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrvddtgdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufgffffkgggtsehttdertddtre dtnecuhfhrohhmpegiuhcuvehhuhhnhigrnhhguceomhgrihhlseiguhgthhhunhihrghn ghdrmhgvqeenucfkphepuddujedrleefrddvtdeirddufeefnecurfgrrhgrmhepmhgrih hlfhhrohhmpehmrghilhesgihutghhuhhnhigrnhhgrdhmvgenucevlhhushhtvghrufhi iigvpedt X-ME-Proxy: Received: from Chunyangs-MacBook-Air.local (unknown [117.93.206.133]) by mail.messagingengine.com (Postfix) with ESMTPA id 4EF158005A for ; Fri, 28 Jun 2019 09:23:27 -0400 (EDT) From: Xu Chunyang To: bug-gnu-emacs@gnu.org Subject: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect User-Agent: Emacs/26.2.90 Date: Fri, 28 Jun 2019 21:23:24 +0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) C-h f mapconcat says > SEPARATOR must be a string. but nil works fine (mapconcat #'identity '("a" "b") nil) ;; => "ab" and `string-join` relies on this fact (by the way, string-join's docstring doesn't explain the case when separator is omitted or nil) (defsubst string-join (strings &optional separator) "Join all STRINGS using SEPARATOR." (mapconcat 'identity strings separator)) C-h S mapconcat says > SEPARATOR, which also must be a string, or a vector or list of > characters. C-h f concat says > Each argument may be a string or a list or vector of characters (integers). ------------=_1562398442-8302-1--