>> I've implemented this in >> https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00884.html >> but the implementation was not too compact, >> so I'm not sure if it's worth adding as an option. > > Looks nice! Adding it as an option sounds like a good idea to me... > but would this need another variable in addition to the other variable > you proposed to just alter the sorting, or could these things somehow be > the same variable? Better to try adding all options to the same variable to reduce the number of knobs. > Adding these headers would only make sense if the user is sorting by > code instead of name... so could the `read-char-by-name-sort-function' > variable instead be, say, `read-char-by-name-display' with values > `names', `code', `sections' (where `names' would be the current one, > `code' just sort by code, and `sections' would sort by code, and display > headings)? Or something along those lines? Yep. The only difference that this patch (that contains previous implementation of grouping by blocks) uses `nil' instead of `names' since this is the default value. Oops, I noticed that my previous implementation sorted by names inside each block, not by code. I'm not sure if this makes sense? Definitely, sorting by code inside blocks should be implemented as the primary feature, but should an additional option with previous implementation be retained to sort inside blocks by names too?