<p dir="auto">the following does not work</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; let
       global @inline function foo(x::T) where {T}
       T
       end
       end"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">let</span>
       <span class="pl-k">global</span> <span class="pl-c1">@inline</span> <span class="pl-k">function</span> <span class="pl-en">foo</span>(x<span class="pl-k">::</span><span class="pl-c1">T</span>) <span class="pl-k">where</span> {T}
       T
       <span class="pl-k">end</span>
       <span class="pl-k">end</span></pre></div>
<p dir="auto">but the following does work</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; let
       global @inline function foo{T}(x::T)
       T
       end
       end"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">let</span>
       <span class="pl-k">global</span> <span class="pl-c1">@inline</span> <span class="pl-k">function</span> <span class="pl-en">foo</span><span class="pl-c1">{T}</span>(x<span class="pl-k">::</span><span class="pl-c1">T</span>)
       T
       <span class="pl-k">end</span>
       <span class="pl-k">end</span></pre></div>
<p dir="auto">According the the  <a href="https://docs.julialang.org/en/stable/manual/profile/" rel="nofollow">manual</a><br>
<code class="notranslate">Profile.print</code> should take a kwarg saying how many columns to print.<br>
This is a useful feature I would like to use.</p>
<p dir="auto">Here is what happens when I run the example code:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="s = open(&quot;/tmp/prof.txt&quot;,&quot;w&quot;)
Profile.print(s,cols = 500)
close(s)

MethodError: no method matching print(::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}; cols=500)
you may have intended to import Base.print
Closest candidates are:
  print{T&lt;:Unsigned}(::IO, ::Array{T&lt;:Unsigned,1}, ::Dict{K,V}; format, C, combine, sortedby, maxdepth) at profile.jl:88 got unsupported keyword argument &quot;cols&quot;
  print{T&lt;:Unsigned}(::IO, ::Array{T&lt;:Unsigned,1}) at profile.jl:88 got unsupported keyword argument &quot;cols&quot;
  print(::IO) at profile.jl:88 got unsupported keyword argument &quot;cols&quot;
 in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}) at &lt;missing&gt;:0
 in (::Base.Profile.#kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream) at &lt;missing&gt;:0
 in include_string(::String, ::String) at loading.jl:441
 in eval(::Module, ::Any) at boot.jl:234
 in (::Atom.##65#68)() at eval.jl:40
 in withpath(::Atom.##65#68, ::Void) at utils.jl:30
 in withpath(::Function, ::Void) at eval.jl:46
 in macro expansion at eval.jl:109 [inlined]
 in (::Atom.##64#67{Dict{String,Any}})() at task.jl:60"><pre class="notranslate">s <span class="pl-k">=</span> <span class="pl-c1">open</span>(<span class="pl-s"><span class="pl-pds">"</span>/tmp/prof.txt<span class="pl-pds">"</span></span>,<span class="pl-s"><span class="pl-pds">"</span>w<span class="pl-pds">"</span></span>)
Profile<span class="pl-k">.</span><span class="pl-c1">print</span>(s,cols <span class="pl-k">=</span> <span class="pl-c1">500</span>)
<span class="pl-c1">close</span>(s)

MethodError<span class="pl-k">:</span> no method matching <span class="pl-c1">print</span>(<span class="pl-k">::</span><span class="pl-c1">IOStream</span>, <span class="pl-k">::</span><span class="pl-c1">Array{UInt64,1}</span>, <span class="pl-k">::</span><span class="pl-c1">Dict{UInt64,Array{StackFrame,1}}</span>; cols<span class="pl-k">=</span><span class="pl-c1">500</span>)
you may have intended to <span class="pl-k">import</span> Base<span class="pl-k">.</span>print
Closest candidates are<span class="pl-k">:</span>
  <span class="pl-c1">print</span><span class="pl-c1">{T&lt;:Unsigned}</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>, <span class="pl-k">::</span><span class="pl-c1">Array{T&lt;:Unsigned,1}</span>, <span class="pl-k">::</span><span class="pl-c1">Dict{K,V}</span>; format, C, combine, sortedby, maxdepth) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span>
  <span class="pl-c1">print</span><span class="pl-c1">{T&lt;:Unsigned}</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>, <span class="pl-k">::</span><span class="pl-c1">Array{T&lt;:Unsigned,1}</span>) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span>
  <span class="pl-c1">print</span>(<span class="pl-k">::</span><span class="pl-c1">IO</span>) at profile<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">88</span> got unsupported keyword argument <span class="pl-s"><span class="pl-pds">"</span>cols<span class="pl-pds">"</span></span>
 <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Base.Profile.</span><span class="pl-c"><span class="pl-c">#</span>kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream, ::Array{UInt64,1}, ::Dict{UInt64,Array{StackFrame,1}}) at &lt;missing&gt;:0</span>
 <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Base.Profile.</span><span class="pl-c"><span class="pl-c">#</span>kw##print)(::Array{Any,1}, ::Base.Profile.#print, ::IOStream) at &lt;missing&gt;:0</span>
 <span class="pl-k">in</span> <span class="pl-c1">include_string</span>(<span class="pl-k">::</span><span class="pl-c1">String</span>, <span class="pl-k">::</span><span class="pl-c1">String</span>) at loading<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">441</span>
 <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Any</span>) at boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">234</span>
 <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#65#68)() at eval.jl:40</span>
 <span class="pl-k">in</span> <span class="pl-c1">withpath</span>(<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#65#68, ::Void) at utils.jl:30</span>
 <span class="pl-k">in</span> <span class="pl-c1">withpath</span>(<span class="pl-k">::</span><span class="pl-c1">Function</span>, <span class="pl-k">::</span><span class="pl-c1">Void</span>) at eval<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">46</span>
 <span class="pl-k">in</span> <span class="pl-k">macro</span> expansion at eval<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">109</span> [inlined]
 <span class="pl-k">in</span> (<span class="pl-k">::</span><span class="pl-c1">Atom.</span><span class="pl-c"><span class="pl-c">#</span>#64#67{Dict{String,Any}})() at task.jl:60</span></pre></div>
<p dir="auto">Looking in the <a href="https://github.com/JuliaLang/julia/blob/98414b9a8bfd0708a03a711cf22f87fd03dd789d/base/profile.jl#L142">source</a><br>
it seems that now the number of columns is being determined by the displaysize.<br>
Which has serveral problems:</p>
<ul dir="auto">
<li>Doesn't match docs</li>
<li>Not at all useful for deeply nestested code. I know my code, which isn't even that deep, is down to just a few letters for each function name, before it is cut-off, which makes it nearly useless</li>
<li>displaysize doesn't make sense when the output is not going to STDOUT anyway.</li>
</ul>