I've created my first standalone Rust library! line-numbers is a simple project for finding line numbers of string offsets, efficiently: https://crates.io/crates/line-numbers
It's factored out of difftastic as it's something I want to reuse elsewhere.
miniblog.
Related Posts
One interesting design choice in Emacs that I haven't seen in other editors: reserved shortcuts.
An Emacs extension shouldn't use F5 through F12, or Ctrl-c LETTER. This lets users configure their own shortcuts. https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html
Does it exist elsewhere? I miss it in VS Code, where e.g. all the Fn keys are already assigned.
One interesting design choice in Emacs that I haven't seen in other editors: reserved shortcuts.
An Emacs extension shouldn't use F5 through F12, or Ctrl-c LETTER. This lets users configure their own shortcuts. https://www.gnu.org/software/emacs/manual/html_node/emacs/Key-Bindings.html
Does it exist elsewhere?
Lisp is the only language I've seen where it's idiomatic to have some locals scoped to the *middle* of a function. It's a consequence of let blocks.
It's neat, but I rarely miss it elsewhere. I'm happy with "scoped from here to the end of the block" in e.g. C or Rust.