unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: W. Greenhouse <wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org>
To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org
Subject: Re: How to make (format "%S" ...) print nothing?
Date: Sat, 12 Jul 2014 14:30:45 +0000	[thread overview]
Message-ID: <87ion2y7hm.fsf@motoko.kusanagi> (raw)
In-Reply-To: 87sim6luw2.fsf@gmail.com

Thorsten Jolitz <tjolitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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.




  reply	other threads:[~2014-07-12 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-12 10:43 How to make (format "%S" ...) print nothing? Thorsten Jolitz
2014-07-12 14:30 ` W. Greenhouse [this message]
2014-07-12 15:44   ` Thorsten Jolitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ion2y7hm.fsf@motoko.kusanagi \
    --to=wgreenhouse-sgozh3hwpm2stnjn9+bgxg@public.gmane.org \
    --cc=help-gnu-emacs-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).