From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Huchler Newsgroups: gmane.emacs.help Subject: Re: concat vs format Date: Sun, 09 Dec 2018 12:30:46 +0100 Message-ID: <87bm5vaqe1.fsf@mail.de> References: <6038B67F-98A7-42B9-8486-97DB99D63033@gmail.com> <4A03F880-46F5-47AA-BFA9-7CA09FB9D7AA@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1544354974 9057 195.159.176.226 (9 Dec 2018 11:29:34 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 11:29:34 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 12:29:30 2018 Return-path: 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 ) id 1gVxH8-0002Gm-LM for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 12:29:30 +0100 Original-Received: from localhost ([::1]:54934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVxJF-0002RP-3J for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 06:31:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVxIe-0002RI-IM for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 06:31:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVxIa-0001WL-Eo for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 06:31:04 -0500 Original-Received: from [195.159.176.226] (port=46474 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVxIa-0001VT-6E for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 06:31:00 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1gVxGQ-0001N4-SD for help-gnu-emacs@gnu.org; Sun, 09 Dec 2018 12:28:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:pKsEUpDbwJwC3YGJ6p49rXZXssI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118932 Archived-At: I run into a similar problem when I used the prin1 function. It had to do with the default value auf print-length which was to low. can you put a (let* ((print-length 5000)) around your code and test that? Or look up the variable if it could have something todo with your problem. Jean-Christophe Helary writes: >> On Dec 9, 2018, at 13:09, Drew Adams wrote: >> >>> Is there a difference between: >>> (concat firstPartofURL secondPartofURL) and >>> (format "%s%s" firstPartofURL secondPartofURL)? >> >> 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