From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: prin1 / princ vs message ? Date: Sun, 02 Jul 2017 14:27:24 +0000 Message-ID: References: <061782A1-0A51-49A1-9AA4-706AF8927D01@gmail.com> <94EF128F-6A3D-41DD-B92D-0C165A4A8EB9@gmail.com> <617557F2-0316-4504-BE80-E7F29E4EE347@gmail.com> <86E604C6-4A01-42D2-A3CD-D758FC5DD8B1@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a11409ab2a163a90553567379" X-Trace: blaine.gmane.org 1499005766 6945 195.159.176.226 (2 Jul 2017 14:29:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Jul 2017 14:29:26 +0000 (UTC) To: Jean-Christophe Helary , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 02 16:29:20 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRfsE-0001Mb-6z for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 16:29:18 +0200 Original-Received: from localhost ([::1]:58214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRfsJ-0007zk-D2 for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 10:29:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRfqd-0006ib-4p for emacs-devel@gnu.org; Sun, 02 Jul 2017 10:27:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dRfqc-0006Z4-44 for emacs-devel@gnu.org; Sun, 02 Jul 2017 10:27:39 -0400 Original-Received: from mail-oi0-x22c.google.com ([2607:f8b0:4003:c06::22c]:33715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dRfqb-0006Xw-UD for emacs-devel@gnu.org; Sun, 02 Jul 2017 10:27:38 -0400 Original-Received: by mail-oi0-x22c.google.com with SMTP id p188so66205023oia.0 for ; Sun, 02 Jul 2017 07:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=0uIJOOMeIlLTSZLY/0xgD3oqRk5fI41akwRNlRWqYuQ=; b=ohuuLvkPmTHtMbzTLqCjbRWd+rLpdPNrXXlbo3u78bIp//P9cAS/1OeZJMAZzNWRgj hSRtW8KkAJF6f2DMY0YF5S2N81xkZm7YCcPrRKpINOMeeFVRQw3Mf6WoiheDekrxhBX0 01mWlIUE8lILsuWxiNz+89UGqUjekcXm7lsy3O10xJwvgYSRM1anafVByk7s48PJjdaz U3UWipm2QMT5CrPgxHg1Vrd30Ez656eW9dUFhC+raJUF1Qfj5lHYbzOrH4ZdxFq88zO4 t4dvGUm/gAZE2i2HvZolBRUec68/PSQDHyhVgPjsK46uUHxY2wJNdYCewIpvwwDnJhev Ceuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=0uIJOOMeIlLTSZLY/0xgD3oqRk5fI41akwRNlRWqYuQ=; b=DajLhxSyavSlMFbEFYpGeb8aac1zdAz7MrhxhSZv71+jJR19WyMwSbKEGr4q1DO/2o FnXUG2xEmZvW2A4LzHY2qkBcIT8gANozY1BVbbQXmaeQxiVZ9ZRfjDfVHrDVrOMmDxzp QGVYiVJNp+GfNX0bCFaHn95DQh9hySKKthexZW3OKDwDWu/IYmHnGMoVcWwf20tWs3J4 Z96ZzMt2HPbp/CpieQleKIPDx3gwCPG/51IQjHh9g9wVFctn6H1IQVoKUFNOdUk9yp9z ogbExyH6aFumLngefEL++vFHFOwS3zz2dgpjGOnK5tMPjEk5gM4wTKUAOBi3QCPj+0LK fAtg== X-Gm-Message-State: AKS2vOzIJzIkT0OpEb8QlGDkwi3SY+U8T2v8/K/tD5yqw9KGZqtodGTT BAgyWE/xNBk2Cc9/ZjRWZfL6hFE2kw== X-Received: by 10.202.104.144 with SMTP id o16mr9223522oik.114.1499005655801; Sun, 02 Jul 2017 07:27:35 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216102 Archived-At: --001a11409ab2a163a90553567379 Content-Type: text/plain; charset="UTF-8" Jean-Christophe Helary schrieb am So., 2. Juli 2017 um 16:03 Uhr: > Conclusion of that exchange (sorry for being a little slow to understand > everything the 3 of you wrote): > > This: > (prin1 name) > (princ " is ") > (princ (if (memq (aref status 0) '(?a ?e ?i ?o ?u)) "an " "a ")) > (princ status) > (princ " package.\n\n") > > Can reasonably be replaced by this: > (let (sentence (format "The status of package %1$S > is `%2$s'.\n\n" name status))) > (princ sentence)) > > Is that correct ? > You should probably use `format-message' instead of `format' here. `format-message' is for messages displayed to the user, and I'd imagine when introducing localization you'd integrate it only with `format-message', not `format'. --001a11409ab2a163a90553567379 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Jean-C= hristophe Helary <je= an.christophe.helary@gmail.com> schrieb am So., 2. Juli 2017 um 16:0= 3=C2=A0Uhr:
Conclusion of that exchange (sorry for being a little slo= w to understand everything the 3 of you wrote):

Th= is:
=C2=A0 =C2=A0=C2=A0(prin1 name)
=C2=A0 =C2=A0=C2=A0(princ= =C2=A0" is ")
=C2=A0 =C2=A0=C2=A0(princ (if=C2=A0(memq (aref s= tatus 0) '(?a ?e ?i ?o ?u))=C2=A0"an "=C2=A0"a=C2=A0&quo= t;))
=C2=A0 =C2=A0=C2=A0(princ status)
=C2=A0 =C2=A0=C2=A0(princ=C2= =A0" package.\n\n")

Can reasonably be replaced = by this:
=C2=A0 =C2=A0=C2=A0(let=C2=A0(sentence (format=C2=A0&quo= t;The status of package %1$S is=C2=A0`%2$s'.\n\n"=C2=A0name status= )))
=C2=A0 =C2=A0=C2=A0(princ sentence))

Is that corre= ct ?

You should probably use `f= ormat-message' instead of `format' here. `format-message' is fo= r messages displayed to the user, and I'd imagine when introducing loca= lization you'd integrate it only with `format-message', not `format= '.=C2=A0
--001a11409ab2a163a90553567379--