GNU bug report logs - #35710
26.1; incomplete mapconcat description string

Previous Next

Package: emacs;

Reported by: phs <at> lsv.fr

Date: Mon, 13 May 2019 09:00:02 UTC

Severity: wishlist

Found in version 26.1

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#35710: closed (26.1; incomplete mapconcat description string)
Date: Fri, 07 Jun 2019 13:03:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 07 Jun 2019 16:02:08 +0300
with message-id <834l51r1kf.fsf <at> gnu.org>
and subject line Re: bug#35710: Acknowledgement (26.1; incomplete mapconcat description string)
has caused the debbugs.gnu.org bug report #35710,
regarding 26.1; incomplete mapconcat description string
to be marked as done.

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


-- 
35710: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35710
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: phs <phs <at> lsv.fr>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; incomplete mapconcat description string
Date: Mon, 13 May 2019 10:43:48 +0200
In my v26.1, the description string for mapconcat is

   mapconcat is a built-in function in ‘src/fns.c’.

   (mapconcat FUNCTION SEQUENCE SEPARATOR)

   Apply FUNCTION to each element of SEQUENCE, and concat the results as
strings.
   In between each pair of results, stick in SEPARATOR.  Thus, " " as
   SEPARATOR results in spaces between the values returned by FUNCTION.
   SEQUENCE may be a list, a vector, a bool-vector, or a string.

The description does not say what is accepted for SEPARATOR, it only
gives an example.

By playing around a bit, it turns out that SEPARATOR can be a string
(obviously), a list of chars, a vector of chars, the empty bool-vector
but not any other bool-vector.

It is not clear why these possibilities are offered while some are not
(e.g., why not make SEPARATOR optional?). This is one more reason to
make the description string explicit about what is allowed.
-- 
Philippe SCHNOEBELEN,       	
"Algebraic symbols are used when you do not know what you are talking about"


[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: phs <at> lsv.fr
Cc: 35710-done <at> debbugs.gnu.org
Subject: Re: bug#35710: Acknowledgement (26.1;
 incomplete mapconcat description string)
Date: Fri, 07 Jun 2019 16:02:08 +0300
> From: phs <phs <at> lsv.fr>
> Date: Tue, 14 May 2019 10:14:02 +0200
> 
> Thanks for the explanations, I never realized that concat was so
> versatile (and I'm an emacs lover since 1983). Live and learn ...
> 
> Here is a suggested replacement for the documentation string (patch
> attached). It produces
> 
> 	Apply FUNCTION to each element of SEQUENCE, and concat the results as
> strings.
> 	In between each pair of results, stick in SEPARATOR.  Thus, " " as
> 	SEPARATOR results in spaces between the values returned by FUNCTION.
> 	SEQUENCE may be a list, a vector, etc. see ‘mapcar’.
> 	SEPARATOR and all values returned by FUNCTION must be accepted by ‘concat’.

Thanks, I fixed the doc string in a slightly different way.  The fix
will be in Emacs 26.3.  I'm therefore marking this bug done.


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

Previous Next


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