From: Philipp Stephani <p.stephani2@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>,
Jean-Christophe Helary <jean.christophe.helary@gmail.com>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: i18n/l10n summary
Date: Thu, 01 Jun 2017 08:17:37 +0000 [thread overview]
Message-ID: <CAArVCkQjXLyYuDq1AnyJg0V2DWrxoVRwTXOyt0=rqKBvqvRu5w@mail.gmail.com> (raw)
In-Reply-To: <dd34ee1d-70f7-6a66-df01-51a52ce12378@cs.ucla.edu>
[-- Attachment #1: Type: text/plain, Size: 1719 bytes --]
Paul Eggert <eggert@cs.ucla.edu> schrieb am Do., 1. Juni 2017 um 07:18 Uhr:
> Thanks for that patch: it's a good move forward for i18n. Some suggestions:
>
> * Today I fixed the bug with "%%" and the 'error' function, so there's no
> need
> for a FIXME or a workaround any more.
>
> * In strings.texi, reorder the format spec description so that it matches
> the
> textual order of a format spec. This should lessen confusion.
>
> * Allow field numbers in a %% spec. All other components of a format spec
> are
> allowed in %%, so odd to report an error for just field numbers.
>
The reason I banned that initially is that the behavior for the case "%1$%
%d" is confusing: will the %d take argument 1 or 2? (We should ban such
mixing instead, see below.)
>
> * There is no need for a special diagnostic for field numbers greater than
> PTRDIFF_MAX. Just use the same diagnostic other too-large field numbers
> use.
> This avoids a need for an alloca.
>
> * Reword "Invalid field number `0'" to "Invalid format field number 0" to
> make
> it more obvious that it's a format and there's no need to quote the 0.
>
> Proposed further patch attached (it addresses the above points), along
> with a
> copy of your patch rebased to current master for convenience.
>
Thanks, feel free to push.
Two further things:
- Probably there's a bug lurking because the info[n] ought to be indexed by
specification index, not argument index. Something like (format "%1$c %1$d"
?a) will probably do the wrong thing (untested).
- We should ban mixing explicit and implicit field numbers, like POSIX
printf(3) does. The gain from allowing to mix is negligible, and it makes
the implementation and the documentation needlessly complex.
[-- Attachment #2: Type: text/html, Size: 2314 bytes --]
next prev parent reply other threads:[~2017-06-01 8:17 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-28 5:29 i18n/l10n summary Jean-Christophe Helary
2017-05-28 14:27 ` Drew Adams
2017-05-28 14:36 ` Jean-Christophe Helary
2017-05-28 15:33 ` Eli Zaretskii
2017-06-05 12:55 ` Jean-Christophe Helary
2017-07-17 23:22 ` Jean-Christophe Helary
2017-07-22 12:48 ` Jean-Christophe Helary
2017-07-22 13:06 ` Eli Zaretskii
2017-07-22 13:45 ` Jean-Christophe Helary
2017-07-22 14:08 ` Eli Zaretskii
2017-07-22 23:54 ` Jean-Christophe Helary
2017-07-23 14:39 ` Eli Zaretskii
2017-07-23 23:29 ` Jean-Christophe Helary
2017-07-24 14:47 ` Eli Zaretskii
2017-07-24 15:34 ` Jean-Christophe Helary
2017-07-24 15:51 ` Eli Zaretskii
2017-07-24 16:08 ` Jean-Christophe Helary
2017-07-24 16:29 ` Eli Zaretskii
2017-07-24 16:48 ` Jean-Christophe Helary
2017-07-24 16:55 ` Eli Zaretskii
2017-05-31 22:18 ` Philipp Stephani
2017-05-31 22:29 ` Jean-Christophe Helary
2017-06-01 5:18 ` Paul Eggert
2017-06-01 8:17 ` Philipp Stephani [this message]
2017-06-01 23:20 ` Paul Eggert
2017-06-02 6:52 ` Philipp Stephani
2017-06-03 8:37 ` Paul Eggert
2017-06-03 9:12 ` Andreas Schwab
2017-06-03 9:34 ` Philipp Stephani
2017-06-04 15:54 ` Paul Eggert
2017-06-04 16:45 ` Eli Zaretskii
2017-06-04 18:37 ` Paul Eggert
2017-12-03 5:43 ` Paul Eggert
2017-06-01 14:21 ` Eli Zaretskii
2017-07-02 1:22 ` Jean-Christophe Helary
2017-07-02 2:34 ` Eli Zaretskii
2017-07-28 0:15 ` Byung-Hee HWANG (황병희, 黃炳熙)
2018-04-25 12:58 ` Jean-Christophe Helary
2018-09-21 4:18 ` Jean-Christophe Helary
[not found] <<AA86315D-1561-41EB-A349-63100C565E8D@gmail.com>
[not found] ` <<0aca6c65-4610-44c2-99c4-6cbe7aa68c9a@default>
[not found] ` <<83a85xgfo2.fsf@gnu.org>
2017-05-28 21:52 ` Drew Adams
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='CAArVCkQjXLyYuDq1AnyJg0V2DWrxoVRwTXOyt0=rqKBvqvRu5w@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
--cc=jean.christophe.helary@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).