Subject: Re: bug#73813: 30.0.91; icomplete-mode keymap unusable in xterm for for/backward completions

From: Van Ly <[email-masked]>
Date: Thu, 17 Oct 2024 09:34:37 +0000

Robert Pluim <[email-masked]> writes:

>>>>>> On Thu, 17 Oct 2024 06:30:40 +0000, Van Ly <[email-masked]> said:
>
>
>     Van> That is the workaround I use to experience emacsclient "--color=no".
>
> Then you should use TERM=xterm-mono (or set allowColorOps to false,
> although I havenʼt tested that)
>

I confirm TERM=xterm-mono does the trick and suggest it go in the
Emacs QAF to advise people to use that for the emacsclient no color effect.

>     Van> icomplete.el lists fido in icomplete-fido-mode-map and there a control
>     Van> prefix alphabetic sequence for previous/next completion is possible
>     Van> consistent with fido's C-s, C-r or icomplete-vertical's C-n, C-p.
>
> Iʼm not sure what youʼre asking for here.
>

I can't comprehend why hoops have to be jumped through for
icomplete-mode to skip among completions using C-, and C-. where
icomplete-vertical-mode does using C-n and C-p, and, this I haven't
checked, fido-mode does using C-s and C-r.

Looking for the "fido" token in icomplete.el, I found the following

  .33 matches in 32 lines for "fido" in buffer: icomplete.el
  .    318:;;;_* Helpers for `fido-mode' (or `ido-mode' emulation)
  .    320:(defun icomplete-fido-kill ()
  .    360:(defun icomplete-fido-delete-char ()
  .    369:(defun icomplete-fido-ret ()
  .    383:(defun icomplete-fido-exit (force)
  .    394:(defun icomplete-fido-backward-updir ()
  .    409:(defvar-keymap icomplete-fido-mode-map
  .    410:  :doc "Keymap used by `fido-mode' in the minibuffer."
  .    411:  "C-k"     #'icomplete-fido-kill
  .    412:  "C-d"     #'icomplete-fido-delete-char
  .    413:  "RET"     #'icomplete-fido-ret
  .    414:  "C-m"     #'icomplete-fido-ret
  .    415:  "DEL"     #'icomplete-fido-backward-updir
  .    416:  "M-j"     #'icomplete-fido-exit
  .    424:(defun icomplete--fido-ccd ()
  .    437:(defun icomplete--fido-mode-setup ()

Until I could get emacs to receive C-, and C-. the workaround I've put
together by necessity is

1 (add-hook 'icomplete-minibuffer-setup-hook
2   (lambda ()
3     (keymap-set icomplete-minibuffer-map "C-f" #'icomplete-forward-completions)
4     (keymap-set icomplete-minibuffer-map "C-b" #'icomplete-backward-completions)
5     (keymap-set icomplete-minibuffer-map "C-n" #'icomplete-forward-completions)
6     (keymap-set icomplete-minibuffer-map "C-p" #'icomplete-backward-completions)
7     (keymap-set icomplete-minibuffer-map "C-s" #'icomplete-forward-completions)
8     (keymap-set icomplete-minibuffer-map "C-r" #'icomplete-backward-completions)))

-- 
vl