all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: 43439@debbugs.gnu.org
Subject: bug#43439: [PATCH] doprnt improvements
Date: Wed, 16 Sep 2020 17:58:24 +0300	[thread overview]
Message-ID: <83o8m57oq7.fsf@gnu.org> (raw)
In-Reply-To: <20200916015051.20517-1-eggert@cs.ucla.edu> (message from Paul Eggert on Tue, 15 Sep 2020 18:50:51 -0700)

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Tue, 15 Sep 2020 18:50:51 -0700
> Cc: Paul Eggert <eggert@cs.ucla.edu>
> 
> (doprnt): Omit FORMAT_END argument, since it’s always NULL,
> which means doprnt must call strlen on FORMAT; doing this means
> doprnt needs just one pass over FORMAT, not two.  All callers changed.

This loses a feature.  Emacs traditionally supports strings with
embedded null characters, and this feature is in line with that.  It
is true that it is currently unused, but why is it a good idea to
remove it?

If the problem is the slight inefficiency caused by the call to
strlen, we could instead solve it in the callers: all the formats I've
seen are const strings, so the value of FORMAT_END can be computed at
compile time, and used instead of passing NULL.

> Drop support for
> "%S" which is never used and which would cause GCC to warn anyway.

This is an old compatibility feature, I'd rather not drop it.  Who
knows what code relies on the fact that 'message' and 'format-message'
support it?

Thanks.





  reply	other threads:[~2020-09-16 14:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  1:50 bug#43439: [PATCH] doprnt improvements Paul Eggert
2020-09-16 14:58 ` Eli Zaretskii [this message]
2020-09-16 22:09   ` Paul Eggert
2020-09-18  7:30     ` Eli Zaretskii
2020-10-15 17:58       ` Paul Eggert
2020-10-15 18:12         ` Eli Zaretskii
2020-10-15 18:50           ` Paul Eggert
2020-10-15 19:05             ` Eli Zaretskii
2020-10-15 20:06               ` Paul Eggert
2020-10-17 18:32                 ` Eli Zaretskii
2020-10-18  2:24                   ` Paul Eggert
2020-10-24 10:39                     ` Eli Zaretskii
2020-10-24 21:02                       ` Paul Eggert

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=83o8m57oq7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=43439@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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.