From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: concat with separators ? Date: Sun, 28 May 2017 19:52:57 +0900 (JST) Message-ID: References: <23AEA0E0-C320-4DAD-99AB-95A202FF07AC@gmail.com> <783c09c3-60df-e011-6db4-f8560c00cf92@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-88641929-1495968780=:31422" X-Trace: blaine.gmane.org 1495968824 9617 195.159.176.226 (28 May 2017 10:53:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 May 2017 10:53:44 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: emacs-devel To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 28 12:53:40 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dEvpL-0002NF-Rd for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 12:53:39 +0200 Original-Received: from localhost ([::1]:43414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEvpR-0006zh-6t for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 06:53:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEvon-0006yI-Rj for emacs-devel@gnu.org; Sun, 28 May 2017 06:53:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEvok-0002kJ-RM for emacs-devel@gnu.org; Sun, 28 May 2017 06:53:05 -0400 Original-Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]:35784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dEvok-0002jt-J6 for emacs-devel@gnu.org; Sun, 28 May 2017 06:53:02 -0400 Original-Received: by mail-pg0-x22c.google.com with SMTP id 8so11343703pgc.2 for ; Sun, 28 May 2017 03:53:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=mK/XDDGtJSEHWEHvGlSWJMxoA3aU1PMkGfxsWcW/eNY=; b=E3RE812GCGo5xS4rpsV+qpmxX6UADrHCSQxJ8OCNYmhdOydS4l4tzsssiBiXvq2gEi 8+aG9mCzy7wlBJJkHmTXNVqHecUuqi6rrrDwXn1dfvWGD9pxOw4Gdrjc2RiPv24gMVyU U3uFcqSf0pmsRII1AgXQBHKwZQhUmbt3iYOZ1wTVQmeyveLeuGCvV0BYRO3GgiPhuZ3F GRW6zJ3zLreagYHoTJMOSVJjEzNnq49cz9kspWQqTmKplcDOr3xVCjCxK7ne3SAU0wA8 YXCmmZsJfQDaYmxRGhw3rdaxSIw5iz9zaH34ZsMjegr/R4gECMIZJRWAaUfG1iAjsf7a mWbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=mK/XDDGtJSEHWEHvGlSWJMxoA3aU1PMkGfxsWcW/eNY=; b=TH4dIsQr2BcS663d1XqXvDA5bZrYO4S1KIJ1ZlLkremgR0aEkux0tnnLXfuPa1eULG 0LxBeDkuneRo+ta54PgEaa3TnyTtw8hUCgGBbURRQjwLKl1rqVdEmw6vb/Uc6M1lqlj0 At6eGjUWekuZWBnVrPWpwgAqqbP8oCb3Xq27gfOYjky3Li0PMhBLdlFse545iL+Yc18k 60VmKMtZV1ifiF+46Bx/P4RTXOonU4/vABXsUaf/94xHjKsP8jyuogN9xEReko4Yn6yA RF2Y1n3Y1tHOz+pFzBO1yG5xQ3rFFuViRLwLabOZ6kBtTfh/f5tzL4TTIJFO/XWczWMW yxbw== X-Gm-Message-State: AODbwcCd5HzYA508dQ/q1VNpxz+Xt1SQAuoSt3+vnYBpxPCj9usXPNpG OrT0YMTng+TLBQ== X-Received: by 10.84.236.15 with SMTP id q15mr52615722plk.163.1495968781319; Sun, 28 May 2017 03:53:01 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id m80sm11482257pfg.107.2017.05.28.03.52.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 May 2017 03:53:00 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215277 Archived-At: --8323329-88641929-1495968780=:31422 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Sun, 28 May 2017, Jean-Christophe Helary wrote: > >> On May 24, 2017, at 23:34, Clément Pit-Claudel wrote: >> >>> I just realized today that concat did not come with optional separators (unlike mapconcat). Is there a reason for that ? >>> >>>> I just using mapconcat when I feel that need: >>>> >>>> Example: >>>> >>>> (mapconcat #'identity '("a" "b" "c") "|") => "a|b|c" >>> >>> That's roughly the definition of string-join in subr-x: >>> >>> (defsubst string-join (strings &optional separator) >>> "Join all STRINGS using SEPARATOR." >>> (mapconcat 'identity strings separator)) > > Would it be acceptable to provide separators to concat or is it preferable to use string-join instead? The latter. Func. `concat' accepts and arbitrary number of sequences (not a list of sequences as `string-join'). --8323329-88641929-1495968780=:31422--