[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prin1 / princ vs message ?
From: |
Tino Calancha |
Subject: |
Re: prin1 / princ vs message ? |
Date: |
Sun, 2 Jul 2017 22:21:35 +0900 (JST) |
User-agent: |
Alpine 2.20 (DEB 67 2015-01-07) |
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))
- prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Tino Calancha, 2017/07/02
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Tino Calancha, 2017/07/02
- Re: prin1 / princ vs message ?, Noam Postavsky, 2017/07/02
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Noam Postavsky, 2017/07/02
- Re: prin1 / princ vs message ?,
Tino Calancha <=
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Tino Calancha, 2017/07/02
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- Re: prin1 / princ vs message ?, Philipp Stephani, 2017/07/02
- Re: prin1 / princ vs message ?, Jean-Christophe Helary, 2017/07/02
- (format "Hello %1$S%2$s" 'world "!"), Clément Pit-Claudel, 2017/07/02
- Re: (format "Hello %1$S%2$s" 'world "!"), Jean-Christophe Helary, 2017/07/02
- Re: (format "Hello %1$S%2$s" 'world "!"), Noam Postavsky, 2017/07/02
- Re: (format "Hello %1$S%2$s" 'world "!"), Clément Pit-Claudel, 2017/07/02