From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#12638: 24.2.50; FR: Some suggestions for icomplete-mode Date: Tue, 23 Oct 2012 15:43:11 -0400 Message-ID: References: <87391ieck9.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1351021461 7574 80.91.229.3 (23 Oct 2012 19:44:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2012 19:44:21 +0000 (UTC) Cc: 12638@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 23 21:44:29 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TQkOi-0004We-Gj for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 21:44:20 +0200 Original-Received: from localhost ([::1]:59873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQkOa-0005Fz-IW for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Oct 2012 15:44:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQkOY-0005Fi-Jy for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 15:44:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TQkOX-0005Qe-6j for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 15:44:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TQkOX-0005QH-31 for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 15:44:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TQkQM-0000X1-3q for bug-gnu-emacs@gnu.org; Tue, 23 Oct 2012 15:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Oct 2012 19:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12638 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12638-submit@debbugs.gnu.org id=B12638.13510215131990 (code B ref 12638); Tue, 23 Oct 2012 19:46:01 +0000 Original-Received: (at 12638) by debbugs.gnu.org; 23 Oct 2012 19:45:13 +0000 Original-Received: from localhost ([127.0.0.1]:58174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQkPZ-0000W3-Do for submit@debbugs.gnu.org; Tue, 23 Oct 2012 15:45:13 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:54314) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TQkPX-0000Vp-Tk for 12638@debbugs.gnu.org; Tue, 23 Oct 2012 15:45:12 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCqNj/2dsb2JhbABEsEiDSYEIghUBAQQBViMFCws0EhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="202566871" Original-Received: from 76-10-163-99.dsl.teksavvy.com (HELO pastel.home) ([76.10.163.99]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 23 Oct 2012 15:43:12 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id DD11758CA3; Tue, 23 Oct 2012 15:43:11 -0400 (EDT) In-Reply-To: <87391ieck9.fsf@gmail.com> (Jambunathan K.'s message of "Sat, 13 Oct 2012 23:03:13 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:65945 Archived-At: > 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)))