Running the example at: http://docs.julialang.org/en/latest/manual/interacting-with-julia.html#Customizing-keybindings-1 now gives:
julia> WARNING: Caught an exception in the keymap:
ERROR: MethodError: no method matching (::##1#3)(::Base.LineEdit.MIState, ::Base.REPL.LineEditREPL, ::String)
The applicable method may be too new: running in world age 20393, while current world is 20396.
Closest candidates are:
#1(::Any, ::Any...) at /home/kristoffer/.juliarc.jl:18 (method too new to be called from this world context.)
It should probably be updated to show how to do it in a post #265 world. cc @vtjnash
(This is after applying https://github.com/JuliaLang/julia/pull/19697)
Can I work on this?
This is not a doc issue.
Why not? It's the docs that are incorrect here.
Because it's a REPL bug.
https://discourse.julialang.org/t/proposal-for-a-first-class-dispatch-wrapper/1127 would help make this not-an-issue.
An ugly workaround?
diff --git a/base/LineEdit.jl b/base/LineEdit.jl
index 2749222..dfc237e 100644
--- a/base/LineEdit.jl
+++ b/base/LineEdit.jl
@@ -734,7 +734,7 @@ end
keymap_fcn(f::Void, c) = (s, p) -> return :ok
function keymap_fcn(f::Function, c)
return function (s, p)
- r = f(s, p, c)
+ r = eval(Expr(:call,f,s, p, c))
if isa(r, Symbol)
return r
else
Fixed by #19924