GNU bug report logs - #36418
26.2.90; mapconcat "SEPARATOR must be a string." is incorrect

Previous Next

Package: emacs;

Reported by: Xu Chunyang <mail <at> xuchunyang.me>

Date: Fri, 28 Jun 2019 13:24:02 UTC

Severity: minor

Found in version 26.2.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#36418: closed (26.2.90; mapconcat "SEPARATOR must be a
 string." is incorrect)
Date: Sat, 06 Jul 2019 07:34:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 06 Jul 2019 10:32:51 +0300
with message-id <835zofaa8s.fsf <at> gnu.org>
and subject line Re: bug#36418: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect
has caused the debbugs.gnu.org bug report #36418,
regarding 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
36418: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36418
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Xu Chunyang <mail <at> xuchunyang.me>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2.90; mapconcat "SEPARATOR must be a string." is incorrect
Date: Fri, 28 Jun 2019 21:23:24 +0800
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).


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 36418-done <at> debbugs.gnu.org, mail <at> xuchunyang.me
Subject: Re: bug#36418: 26.2.90;
 mapconcat "SEPARATOR must be a string." is incorrect
Date: Sat, 06 Jul 2019 10:32:51 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sat, 6 Jul 2019 06:17:08 +0200
> Cc: 36418 <at> 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.


This bug report was last modified 5 years and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.