On 7.5.2010 2:50, Thomas Keller wrote:
Hi all! I'd like to hear your comments on a small hack which I added to our lua hooks code: output redirection for print() and io.write(). The rationale behind this is that lua code (be it hooks or even custom commands), which likes to "talk" to the user, most likely use the above mentioned built-ins. These however work directly on STDOUT and this imposes at least three problems: 1) users cannot distinguish lua output from the application's normal output 2) like 1), but even worse for (remote) stdio: for remote_stdio the problem is that the user does not even see it (while he maybe wants to), while for normal stdio the output possibly leads to parsing errors
This would really be an issue for a user written commands. I would prefer to have old behavior for local interactive and scripting use cases, at least in user registered commands context.
The rationale here is that, when user registered commands are used, user must be aware of those commands in the first place and the output generated must be from those user registered commands.
Use cases in the context of hooks and remote stdio are different. Is it even possible to invoke user written commands thru remote stdio or are possibly those messages generated by print from the hooks?
Pasi. _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel