From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: prin1 / princ vs message ? Date: Sun, 2 Jul 2017 22:21:35 +0900 (JST) Message-ID: References: <061782A1-0A51-49A1-9AA4-706AF8927D01@gmail.com> <94EF128F-6A3D-41DD-B92D-0C165A4A8EB9@gmail.com> <617557F2-0316-4504-BE80-E7F29E4EE347@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Trace: blaine.gmane.org 1499001748 4057 195.159.176.226 (2 Jul 2017 13:22:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 2 Jul 2017 13:22:28 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: Emacs developers To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 02 15:22:24 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 1dRepT-0000ko-Sm for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 15:22:24 +0200 Original-Received: from localhost ([::1]:58059 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRepZ-0000eL-B2 for ged-emacs-devel@m.gmane.org; Sun, 02 Jul 2017 09:22:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRep1-0000eD-QO for emacs-devel@gnu.org; Sun, 02 Jul 2017 09:21:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dReow-0003hh-TC for emacs-devel@gnu.org; Sun, 02 Jul 2017 09:21:55 -0400 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:32995) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dReow-0003gW-NG for emacs-devel@gnu.org; Sun, 02 Jul 2017 09:21:50 -0400 Original-Received: by mail-pf0-x234.google.com with SMTP id e7so87851120pfk.0 for ; Sun, 02 Jul 2017 06:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=XONlxKbtBaTJUcD3O8aQ09x2rU1yK2zKM1CbsRlKGXQ=; b=aIqkSWKrKpzHTzuRduiarloQcW8e5RR5Vr6CZxIlQySPx6ZaO6xT91R2Hav16fuLIh WUXPTQlHh453xhkY1MumdGICVFHB5c7llnkiMFpzUt4SJyW/HcIy8cBQa27qbNSu01u9 qWxcWYBke087WsGyUKai2Hmv1b54aDmKm0072/Hdcn3gK4cgPU02e2w0q/IG4vi4OQdf 2zZufyQuH3WBm+DjLZYQeIEsE+Trayw+mmVZ538mNLolNf+YYBkIBRIftTh/7zdTLrNB z+uNZguyWim7ZxmlLkvbcrjHYznuUrz/eSj9xkDVwgkJSf49jaZyR6CECG81WdrjI5Nk mf1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=XONlxKbtBaTJUcD3O8aQ09x2rU1yK2zKM1CbsRlKGXQ=; b=uCgeBckRCToPzb2pWcAkdxXYF/fcygIJUIv2M13E17hDdGLClR8+PUSyxNEIDg3hls GlTd3r3gwqqs55o8gLRwwe5Ate4zvQ6bthlDKHfKy0bPce0FvR910p1hDpXBHtazkBwi /XEBlyC8AelQIudhCaAKaNDoxSrexRns2iE8K0bYY1QDfevXk1DbKQjRUzk22uwllYER SjjE/TySk7W4aTRHFefFLh90NbRekJBUjLavPcDtt0P7yzqS21PoCUOMbxPGCjFrzHLB iyIqcXc6eGZ2tie9+jrE0H1Nyd4HGvuz9TZEcxQaaZSoHAJnJxeCMTqvXuGfWAR4fAGb E21w== X-Gm-Message-State: AIVw110AQxmQ3oJgnDvG++8AM/SfsNIBAii10zQd7n2Vds2mhHFnUAQo 5r8ZnxwUm+Jl2Q== X-Received: by 10.99.123.28 with SMTP id w28mr5170118pgc.183.1499001709728; Sun, 02 Jul 2017 06:21:49 -0700 (PDT) Original-Received: from calancha-pc (222.139.137.133.dy.bbexcite.jp. [133.137.139.222]) by smtp.gmail.com with ESMTPSA id s7sm24295643pgb.53.2017.07.02.06.21.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jul 2017 06:21:49 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: <617557F2-0316-4504-BE80-E7F29E4EE347@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::234 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:216097 Archived-At: On Sun, 2 Jul 2017, Jean-Christophe Helary wrote: > Tony, Noam, > > Thank you very much for the clarifications. > > So, since I expect the developer to know the difference between the prin? collection and message could you tell me if the following is correct: > > Instead of using message to replace that code: > > (let ((name "JC")) > (prin1 "My name ") > (princ " is ") > (princ name) > (princ ".\n\n")) > > It would be better to use something like: > > (let ((sentence (format "My name is %s.\n\n))) > (prin1 sentence)) > > That way I keep the possibility to redirect the output somewhere else while making the sentence actually maintainable... That's sounds pretty OK. I would just modify a bit your example, because currenty doesn't work, you get the error: read-from-minibuffer: End of file during parsing The following must work: (let ((sentence (format "My name is %s.\n\n" "Tino, but often people call me Tony. Who cares? :-)"))) (prin1 sentence))