[Top][All Lists]

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

Re: concat vs format

From: Stefan Huchler
Subject: Re: concat vs format
Date: Sun, 09 Dec 2018 12:30:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

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

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
> -----------------------------------------------
> @brandelune

reply via email to

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