emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#35710: closed (26.1; incomplete mapconcat descript


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#35710: closed (26.1; incomplete mapconcat description string)
Date: Fri, 07 Jun 2019 13:03:02 +0000

Your message dated Fri, 07 Jun 2019 16:02:08 +0300
with message-id <address@hidden>
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
address@hidden.)


-- 
35710: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35710
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.1; incomplete mapconcat description string Date: Mon, 13 May 2019 10:43:48 +0200 User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
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"



--- End Message ---
--- Begin Message --- Subject: Re: bug#35710: Acknowledgement (26.1; incomplete mapconcat description string) Date: Fri, 07 Jun 2019 16:02:08 +0300
> From: phs <address@hidden>
> 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]