From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary <brandelune@gmail.com> Newsgroups: gmane.emacs.help Subject: Re: concat vs format Date: Sun, 9 Dec 2018 19:02:01 +0900 Message-ID: <4A03F880-46F5-47AA-BFA9-7CA09FB9D7AA@gmail.com> References: <6038B67F-98A7-42B9-8486-97DB99D63033@gmail.com> <a91ff9fb-a52c-4a2f-8b57-5d108f502e68@default> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1544349638 23118 195.159.176.226 (9 Dec 2018 10:00:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 10:00:38 +0000 (UTC) To: help-gnu-emacs <help-gnu-emacs@gnu.org> Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 11:00:34 2018 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Envelope-to: geh-help-gnu-emacs@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 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1gVvt1-0005tO-SN for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 11:00:32 +0100 Original-Received: from localhost ([::1]:54472 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1gVvv8-00079t-4d for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 05:02:42 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <brandelune@gmail.com>) id 1gVvue-00079d-Nc for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 05:02:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <brandelune@gmail.com>) id 1gVvuZ-0003Ip-U1 for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 05:02:12 -0500 Original-Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e]:35148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <brandelune@gmail.com>) id 1gVvuZ-0003IN-Lv for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 05:02:07 -0500 Original-Received: by mail-pl1-x62e.google.com with SMTP id p8so3851073plo.2 for <help-gnu-emacs@gnu.org>; Sun, 09 Dec 2018 02:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=1on+pzOcSGukA/qR8n98XddEiF8pvVwRa9ZcRz677iI=; b=o5SLxi+VI091vGDc3mp/APrxOI2UnL5Ndpts94V/3wL+16UhwnGpGgqB8Lx1ZDxsip F3I1BITgqK3MwyKCXQEhHdwndChlQ7uAw5kNX6KbkV6i8FlWdOd9WnlTEAiL8dUJPtoB RuUa4WneO3kV+VvsZ3j79CtK4A/miz3fgutA0t+LtSE6NsHSXIeBtlzk37mzH3yHPjLo u6n/2igbEgyCePTmL+vkGtJRIi6FywuYF84I/V8JDoWgmMbxBIOD22KdFu7Ps9WjpvPg nB5D1OlzzlSqklO/kCflSf+Q6VXSJFEmENfhix384xxz0+esi9131mK5xhy7GwK8l5g9 t/dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=1on+pzOcSGukA/qR8n98XddEiF8pvVwRa9ZcRz677iI=; b=udaXcP1wIKbpccMyfDxMEuUxR59M1tKkJYllMKkiisdQAd99wSqfzWosg4cpfzcFkL lYk3p2tRVGHLnvbU7Z+B/rxLK9niZsNObKrjcL7DigGC+juRqdZO4K9rhjHA/MV2Rpjh fjc0grpfpRprq5h2lUevC+YB1HkRN+R0RqxishJLH0dj9TGGrsHAypzU02E0vJugEZBy 3w5ookbb8TgFuAmOowKb1Y+WEB4cbOaQZg25kWpv0WKf6iyQoKM0WLEv5rv+6bdaNHxs BF/gAdN0ToEZWOUuIeNdJZ7Q2wEECO1QpdaCw5ihTy4FAFR65JCFmqKnY9SRwSkBTSpM vkeg== X-Gm-Message-State: AA+aEWYqnfaLzlhHnUcvpSNdDV1zIHf1bvvd0R7JGThG8ilNW8TDxEVC BgyaEsrsyPFayt3vLThz3DctcbQs X-Google-Smtp-Source: AFSGD/Uu5pUJTrdJ3AkoKlF7wTgBGfoDgGp9RkQadPX1q4lWBnxUpBQkWPLfBjbamVwoYV+fULSUXw== X-Received: by 2002:a17:902:6502:: with SMTP id b2mr8069593plk.44.1544349725333; Sun, 09 Dec 2018 02:02:05 -0800 (PST) Original-Received: from [192.168.1.11] (pl16832.ag0304.nttpc.ne.jp. [128.53.251.192]) by smtp.gmail.com with ESMTPSA id n22sm13795180pfh.166.2018.12.09.02.02.03 for <help-gnu-emacs@gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Dec 2018 02:02:04 -0800 (PST) X-Priority: 3 In-Reply-To: <a91ff9fb-a52c-4a2f-8b57-5d108f502e68@default> X-Mailer: Apple Mail (2.3445.101.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62e X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs/> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Xref: news.gmane.org gmane.emacs.help:118931 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/118931> > On Dec 9, 2018, at 13:09, Drew Adams <drew.adams@oracle.com> wrote: >=20 >> Is there a difference between: >> (concat firstPartofURL secondPartofURL) and >> (format "%s%s" firstPartofURL secondPartofURL)? >=20 > If both args are strings then no; the result > is the same. But the functions are very > different - they take different args and, > aside from some cases like this one where > the result is the same for some args, their > uses/purposes are different. Thank you. I'm trying to create URLs from dates and at one point I get a concat = that outputs "/path/to/url/..." instead of = "/path/to/url/12/04/index.html". I checked the code and put format instead of concat and got the same = result. All the things I try to concat are strings that I progressively = build over other strings, and edebug gives me correct values up to the = point where the wrong string is created... I'm going to re-check the whole thing... Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune