Subject: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions

From: Van Ly <[email-masked]>
Date: Tue, 15 Oct 2024 05:44:16 +0000

Hello,

The two keymaps "C-." and "C-," for for/backward icomplete-mode
completions do not work in xterm where emacs is run without the
graphical user interface.

See,

> icomplete.el:177:183:
> (defvar-keymap icomplete-minibuffer-map
>   :doc "Keymap used by `icomplete-mode' in the minibuffer."
>   "C-M-i" #'icomplete-force-complete
>   "C-j"   #'icomplete-force-complete-and-exit
>   "C-."   #'icomplete-forward-completions
>   "C-,"   #'icomplete-backward-completions
>   "<remap> <minibuffer-complete-and-exit>" #'icomplete-ret)

To demonstrate

 1. start at xterm shell prompt, emacs --color=no -nw -Q
 2. use, M-x icomplete-mode
 3. use, M-x man RET fe

the keymaps "C-." and "C-," are received as "." and "," when intending
to move among available icomplete completions, and the presented
completions are unexpectedly lost.

Perhaps, "C-s" and "C-r" could be used in icomplete-mode since they are
received as "C-s" and "C-r" but carry the search for/backward meaning.
The documentation says fido-mode uses the "C-s" and "C-r" keymaps.

The following keymap is a possible workaround

> (keymap-set icomplete-minibuffer-map "C-c ." #'icomplete-forward-completions)
> (keymap-set icomplete-minibuffer-map "C-c ," #'icomplete-backward-completions)

-- 
vl