prompt-select-session preserves sorting#313
Conversation
xenodium
left a comment
There was a problem hiding this comment.
Thanks for the PR! The Resume session (default: start new): feels more idiomatic. Left a couple of comments.
agent-shell--prompt-select-session now has completion table metadata such that it won't be sorted alphabetically by completion frontends which check display-sort-function (such as the default completion frontend), and sets eager-display and eager-update to reflect that it's a small list of candidates on which completion is cheap. (these are new in Emacs 31) The "Start a new session" candidate is now at the end of the candidate list. It's still the default, so a user can still select it easily by pressing RET, but now they more easily can select the candidates at the start of the candidate list, using whatever methods are specific to their completion frontend.
|
Thanks for the changes. Merged. Heads-up, I may look into further changes. While I like the |
|
Hmmm... feels a little strange for the default option to be the last option. I've pushed 5ec181e bringing the new shell option back to top, but I'm hoping with the introduction of display-sort-function still remains compatible with your flow. |
agent-shell--prompt-select-session now has completion table metadata such that it won't be sorted alphabetically by completion frontends which check display-sort-function (such as the default completion frontend), and sets eager-display and eager-update to reflect that it's a small list of candidates on which completion is cheap. (these are new in Emacs 31)
The "Start a new session" candidate is now at the end of the candidate list. It's still the default, so a user can still select it easily by pressing RET, but now they more easily can select the candidates at the start of the candidate list, using whatever methods are specific to their completion frontend.
Checklist
M-x checkdocandM-x byte-compile-file.