[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make (format "%S" ...) print nothing?
From: |
Thorsten Jolitz |
Subject: |
Re: How to make (format "%S" ...) print nothing? |
Date: |
Sat, 12 Jul 2014 17:44:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
W. Greenhouse <wgreenhouse@riseup.net>
writes:
> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
>> Is there any way to use (format "%S"...) and have it print nothing
>> when given an empty string, an empty list or nil (or something else)?
>
> No. The printed representation of the empty string is "", and the
> printed representation of the list () or nil is nil, so (format "%S" ...)
> will of course print something in these cases. Since you know what that
> something is going to be, perhaps you could use split-string or a
> similar text-mangling function to remove it.
This was not really a problem I could not solve, its easy to work around
it, I was just curious if there is some kind of 'hackers-trick',
someTHING that could be given as arg that does not cause an error but
has no printed representation. I guess not ...
--
cheers,
Thorsten