miniblog.
← Back to all posts
Wilfred Hughes
Aug 3, 2015 at 20:31
Emacs' read-from-minibuffer is great for common cases, but it's annoying when you want a default:
https://github.com/Wilfred/ag.el/commit/54a3e3a876c5839b7aa63e866da00b78a3bedc32
Define ag/read-from-minibuffer. · Wilfred/ag.el@54a3e3a
It's remarkably fiddly to read an input, but provide a default if the user doesn't enter a specific value. There's a good discussion of the different argument options (all awkward!) at ...