It is no longer true that show(io, x)
should be overriden for MIME text/plain. Instead, the MIME version is for multiline display, and the two-argument form for single-line display. See https://github.com/JuliaLang/julia/pull/17113. On Saturday, July 2, 2016 at 8:06:28 AM UTC-4, Steven G. Johnson wrote: > > On Saturday, July 2, 2016 at 5:11:16 AM UTC-4, Sheehan Olver wrote: >> >> What has replaced writemime? I'm trying to fix the 0.5 deprecation >> warnings. >> > > writemime(io, mime, x) has been renamed to show(io, mime, x), and show is > now the correct method to override to change how an object is displayed > with various mime types. If mime == text/plain, you can just do show(io, > x) , and you should override the 2-argument show to change an object's text > output. > > For 0.4 compatibility, you can use Compat and o > > @compat Base.show(io::IO, mime::MIME"....", x::MyType) = .... > > and it will rewrite to a writemime definition on older versions. >
