GNU bug report logs - #12638
24.2.50; FR: Some suggestions for icomplete-mode

Previous Next

Package: emacs;

Reported by: Jambunathan K <kjambunathan <at> gmail.com>

Date: Sat, 13 Oct 2012 17:33:01 UTC

Severity: wishlist

Found in version 24.2.50

Done: Jambunathan K <kjambunathan <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jambunathan K <kjambunathan <at> gmail.com>
Cc: 12638 <at> debbugs.gnu.org
Subject: bug#12638: 24.2.50; FR: Some suggestions for icomplete-mode
Date: Tue, 23 Oct 2012 15:43:11 -0400
> 1. The icomplete candidates are comma separated but WITHOUT spaces.  It
>    makes readability difficult.
>    So introduce `icomplete-decorations' which can be a copy of
>    `ido-decorations' to begin with.  May be the decorations could be
>    extracted to some other file (minibuffer.el?) and commonly shared by
>    both ido and icomplete.

The lack of space is on purpose, to save screen real-estate, so it
indeed needs to be customizable.  But I don't have a strong opinion on
what the default value should be.

> 2. Support for cycling via C-s and C-r, highlighting and selection of
>    current head (all much like ido-mode)

Not sure what "highlighting" refers to; if you mean to put the first
element in bold, then yes, that fine.

Selection of current head can be done with minibuffer-force-complete
(not bound to any key by default), tho it doesn't exit.  But it should be
easy to add a minibuffer-force-complete-and-exit.

To get you started the patch below adds a keymap to icomplete.

Cycling would also be useful and should similarly be easy to add (it
just needs to play around with (completion-all-sorted-completions) and
store it back via completion--cache-all-sorted-completions, like
minibuffer-force-complete does).

> I can prepare a patch for (1).

We're in feature freeze, so please wait a few weeks before sending
your patch.


        Stefan


=== modified file 'lisp/icomplete.el'
*** lisp/icomplete.el	2012-06-22 17:37:28 +0000
--- lisp/icomplete.el	2012-10-23 19:30:20 +0000
***************
*** 169,174 ****
--- 169,179 ----
  Icomplete does not operate with any specialized completion tables
  except those on this list.")
  
+ (defvar icomplete-minibuffer-map
+   (let ((map (make-sparse-keymap)))
+     (define-key map [?\M-\t] 'minibuffer-force-complete)
+     map))
+ 
  ;;;_ > icomplete-mode (&optional prefix)
  ;;;###autoload
  (define-minor-mode icomplete-mode
***************
*** 208,213 ****
--- 213,220 ----
  Usually run by inclusion in `minibuffer-setup-hook'."
    (when (and icomplete-mode (icomplete-simple-completing-p))
      (set (make-local-variable 'completion-show-inline-help) nil)
+     (use-local-map (make-composed-keymap icomplete-minibuffer-map
+ 					 (current-local-map)))
      (add-hook 'pre-command-hook
  	      (lambda () (let ((non-essential t))
                        (run-hooks 'icomplete-pre-command-hook)))





This bug report was last modified 11 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.