all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 19975@debbugs.gnu.org
Subject: bug#19975: 25.0.50; Add %s-like descriptor to `format' that treats nil like empty string
Date: Sun, 1 Mar 2015 23:07:13 -0800 (PST)	[thread overview]
Message-ID: <8f839957-d30e-4b42-85bd-3759a09a05ec@default> (raw)
In-Reply-To: <874mq47jlt.fsf@igel.home>

> > Enhancement request.  Add a new format descriptor to `format' that would
> > behave just like %s except that a nil argument would be treated as if it
> > were "".
> 
> It's easy enough to use (or foo "").

Yes of course "it's easy enough".  That's what we've all been
doing for decades.  It would be even clearer and simpler still
to have a format descriptor for this common use case.

That is what this enhancement request is about - not needing to
write such "easy enough" code.

And of course it is not always (or foo "").
It might well be (if foo "whatever" "").  Or if you prefer,
(let ((bar "whatever")) (or (and foo bar) "")).





  reply	other threads:[~2015-03-02  7:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-01 15:32 bug#19975: 25.0.50; Add %s-like descriptor to `format' that treats nil like empty string Drew Adams
2015-03-01 15:37 ` Drew Adams
2015-03-01 16:44 ` Andreas Schwab
2015-03-02  7:07   ` Drew Adams [this message]
2015-03-02  8:52     ` Andreas Schwab
2016-04-30 17:10   ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=8f839957-d30e-4b42-85bd-3759a09a05ec@default \
    --to=drew.adams@oracle.com \
    --cc=19975@debbugs.gnu.org \
    --cc=schwab@linux-m68k.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.