I am surprised by the following
julia> struct Thing end
julia> x=Thing()
Thing()
julia> Base.show(io::IO,::MIME"text/plain",x::Thing)=print(io,"hello")
julia> show(stdout,MIME"text/plain",x)
ERROR: MethodError: no method matching show(::Base.TTY, ::Type{MIME{Symbol("text/plain")}}, ::Thing)
Closest candidates are:
show(::IO, ::MIME{Symbol("text/plain")}, ::Thing) at REPL[3]:1
show(::IO, ::MIME{Symbol("text/plain")}, ::Any) at multimedia.jl:47
show(::IO, ::MIME{Symbol("text/csv")}, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/DelimitedFiles/src/DelimitedFiles.jl:828
...
Stacktrace:
[1] top-level scope at REPL[4]:1
How to call the method of show
I just defined?