This way, one can filter through the suggestions in a way that's
slightly better than prefix, but less powerful than regexp one.
The implementation is somewhat simplistic. In particular, it doesn't
check the order of space-separated parts and doesn't ensure
that all the matches are unique. Still, better than prefix matching.
This commit adds support for a single dead key in the input line. This allows
for character such as á to be input. However this is restricted to a single dead
key, and characters such as ḉ cannot be entered.
This commit adds an altgr slot to the key structure, and defines an altgr
offset variable. The offset is used for people (such as myself) who have altgr
offsets that arent 2. A function is defined to register altgr as a modifier,
which will ensure that the function is-modifier will register altgr as a
modifier. Finally a function is defined to check if a specific keysym requires
altgr to be input.
Completion candidates during completing-read can now be refined in a customizable
way. The *input-refine-candidates-fn* can be set to customize candidate
refinement. This parameter can be used to filter or sort candidates in novel ways.
By default, completion candidates are refined by prefix in unsorted order to maintain
backwards compatibility. Another refinement function, input-refine-regexp, is
implemented, which provides similar behavior to select-from-menu. That is, it refines
candidates by splitting the input string by space and treating each word as a regexp
to be matched.
There's this really annoying issue when you have a lot of completions:
while it's displaying them, the focus is lost to the underlying
window. So if you type "fi" for firefox (in `<prefix>-!`), the "i" is
sent to the underlying window.
It may be due to me using a truetype font which is slower to render,
or the fact that a single letter will yield a lot of completion
candidates.
Either way, making sure we keep the focus during the whole insertion
solves this issue.
This patch does two (possibly controversial) things:
1. Suppress showing *all* possible completions when the user hasn't typed anything at all yet.
2. If the completion list is truncated to fit `*maximum-completions*`, replace the last completion with `... and N more`.
I added item 1 is because I find it very disconcerting to immediately
have a giant list of words immediately thrown at me when I open
a prompt. It *is* cut down to fit `*maximum-completions*`, but that
means what I end up seeing is the first N alphabetical items every
single time, which doesn't seem super helpful. This patch delays
showing the list of completions until the user has at least typed
*something*.
I added item 2 because if I get a list of completions that looks roughly
like it's around the maximum length I've set, I can't be sure whether
I'm seeing *all* my options or whether there are some I'm not seeing
because they were truncated off.
* Message should end in a period, just like the ANSI spec for errors.
* Also should not end it a fresh line.
* When prompting for user input a colon is best.
Don't ungrab the keyboard in SHUTDOWN-INPUT-WINDOW. This used to be necessary
as SETUP-INPUT-WINDOW was responsibly for grabbing the keyboard. As of 2cf7b54
this is the responsibility of the WITH-FOCUS macro that grabs and ungrabs the
keyboard.
Remove unnecessary comments. DRAW-INPUT-BUCKET is self-explanatory and the
other comment was for a line that is no longer there.
Ref-COMMIT: 2cf7b54b92
This was the behaviour before 30110c2c5f.
I suspect it was removed because yes-or-no-p wouldn't properly handle
completed values with a trailing space. To fix that, this changes
yes-or-no-p to trim spaces.
This keeps READ-ONE-line backwards compatible to changes prior
dae0422811. Currently both
ARGUMENT-POP-OR-READ and ARGUMENT-POP-REST-OR-READ are still being
called with the previous lambda list. Update the calls to the
READ-ONE-LINE that used the 'new' lambda list, COMPLETING-READ and
YES-OR-NO-P.
Closes#538
A completion style is anything that implements
input-completion-reset and input-completion-complete.
The default completion style is now called
input-completion-style-cyclic and can be constructed
with make-input-completion-style-cyclic.
Added special variable *input-completion-style*.
Its default value is (make-input-completion-style-cyclic)
to maintain the current behaviour.
Added a new style that instead of cycling through possible completions,
completes as much as is possible unambiguously and otherwise displays
a message window with the possible completions.
This style is called input-completion-style-unambiguous.
Given that we use &allow-other-keys, the function can still be called
with all the keys appropriately. There's no need to blindly add the
argument to declare it as ignored.