That actually works. I'm not sure we should be doing this routinely, though. In most instances I think it's better to post as text, so that people can read and comment inline.
Still, it's a cool idea.
Helen Read University of Vermont
On 1/5/2013 2:17 AM, David Bailey wrote: > I suddenly realised that there is (probably) a way to attach a notebook > to a message here! The trick is to compress the expression which is the > notebook: > > Compress[NotebookGet[nb]] > > For example: > > "1:eJzVUslOwzAQdSlQtgouHLggIwS0YhGtqooTEruQgEoNggPikBQHLBw7xI5aOHHmyF8\ > hxI/wFXicUNKUpYgTl5c3M2/\ > Gs2TGEXV3ACEkhzQcCUUcIa7dDHj6NRxQqT6sLcKY2wdWPrb2AhH627ayI3c7JZtMsSY1s\ > TybMSxtz2cE8/ghaxQioSNDR1HFyEeVesiIHI8LbF3Z/JIcU49IAgpoCL4I4YXy4+\ > sGQlMF+P6506hATsOmaBmxcQxCQ6KpfW5/MtkCckQ0AdlZl3ige42JaN+\ > 30e6HrJvgq4eyHWKIzhpcNFg2eG5w3uCSwVaCV2INtLzP/VD99hT3T9PmFPcPc+\ > YUvew1F08FI/w8UjTG4r9LjXcN0lqoelttJl4tQi9mnUZd8wlvk1SREU1OKb8QTYveEf5+\ > lmcNDd1ZSp1vqw/t4JJymfoZOyw5rMlGqIRnK9qgY5lkORDQdbA6VJ+\ > MuBsIrnb4xQkJJBXcqmjf2soqdkWAD2kjEFK4CkddSVyoVpYdqoq4UGso4ZAAV5dwebVUK\ > qZKT8BJ1C0j28SlnCpdWlqwDW3bIVMr3HkDs7QGzA==" > > Since Compress only uses printable ASCII characters, hopefully if you > paste the above string into a notebook and perform: > > string//Uncompress//NotebookPut > > Of course, it is also possible to paste the raw output from NotebookGet, > but that will be considerably more voluminous. Also a compressed string > that becomes corrupted will be utterly destroyed, so it is probably > safer than using the raw BoxForm expression. > > NB: The 9.0 bug that messes up cell merges, also affects NotebookGet, so > I would suggest you use 8.0.4 for this trick until 9.1 comes out. > > This is really a test to discover if this survives the posting process! > > David Bailey > http://www.dbaileyconsultancy.co.uk >
One possibility that it certainly adds is passing images together with our = messages here. Of course, the string length may be rather large. For exampl= e, Evaluate this: Uncompress[stringLena]
Where stringLena is the compressed form of the famous Lena image from the M= enu/Help/Image: